Show TOC

Managing the Navigation CacheLocate this document in the navigation structure

Context

The Navigation Cache API ( INavigationCacheManager interface) enables you to manage the navigation cache programmatically. This API is a part of the Navigation Service , and provides the following methods:

Accessing the Cache

Use the following methods to get/set configuration of the specified navigation connector cache, and control all registered navigation connectors:

  • CacheConfigurator getCacheConfigurator(String cacheID)

  • Boolean setCacheConfigurator(CacheConfigurator cfg)

  • String[] getAllCacheIDs()

  • String[] setCacheEnable(boolean enable)

Clearing and Synchronizing the Cache

Use the following methods to clear or synchronize all or specific cache entries in the local node or all nodes in the cluster:

  • String[] applyCacheAction(String cacheID, CacheAction cacheAction, boolean cluster)

  • String[] applyCacheAction(String cacheID, CacheAction cacheAction, String[] entryIDs, boolean recursive, boolean cluster)

For detailed information, see Enterprise Portal API Javadocs at http://help.sap.com/javadocs.

Procedure


  1. Obtain the reference to the navigation service:

    INavigationService navService = PortalRuntime.getRuntimeResources().getService(INavigationService.KEY);

  2. Obtain the INavigationCacheManager object from the navigation service:

    INavigationCacheManager cacheManager = navService.getNavigationCacheManager();

  3. Call the interface methods as required.

Next Steps

You can also use the generic Cache Management API to manage the navigation cache. For more information, see Managing Portal Caches .