Managing the Navigation Cache

Use

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

Methods to get/set configuration of the specifiednavigationconnector cache, andcontrol all registered navigation connectors:

  • CacheConfigurator getCacheConfigurator(String cacheID)

  • Boolean setCacheConfigurator(CacheConfigurator cfg)

  • String[] getAllCacheIDs()

  • String[] setCacheEnable(boolean enable)

Clearing and Syncronizing the Cache

Methods to clear or syncronize 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 https://www.sdn.sap.com/irj/sdn/javadocsInformation published on SAP site.

Procedure

  1. Obtain the reference to the navigation service:

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

  2. Retrieve the INavigationCacheManager object from the navigation service:

    INavigationCacheManager cacheManager = navService.getNavigationCacheManager();

  3. Invoke the interface methods as required.