Show TOC

Caching Navigation NodesLocate this document in the navigation structure

Use

To improve performance, the portal caches each set of navigation nodes required by a user. If a user accesses a navigation hierarchy that was previously accessed, the portal can retrieve the navigation hierarchy from the cache instead of generating it again.

The navigation cache stores nodes separately for each navigation connector. The cache stores both entry points and navigation nodes.

Recommendation

This feature is disabled by default so that navigation nodes are not cached during testing and configuration of the portal.

Once the portal is ready for production, the caching feature can be enabled.

For more information, see Navigation Cache and Creating Navigation Connectors .

Procedure

Using the navigation cache interface, you can determine if and how the entry points and navigation nodes in your portal are cached.

You access the interface in the portal from Start of the navigation path System Administration Next navigation step System Configuration Next navigation step Cache Management Next navigation step Navigation Cache End of the navigation path.

The main Navigation Cache screen enables you to perform actions on all of the connectors simultaneously, and to access the settings for each connector separately.

Enabling/Disabling the Cache

The navigation cache is disabled by default. The Navigation Connectors table shows the current caching status for each connector.

To enable/disable caching for all navigation connectors, in the Cache Management area, choose Enable All / Disable All .

To enable/disable caching for a specific navigation connector:

  1. In the Navigation Connectors table, in the row containing the connector for which you want to enable caching, choose Configure .

  2. In the connector's configuration screen, choose Enable Cache .

    When the cache is enabled, the text on this button changes to Disable Cache .

Clearing the Cache

If you change the navigation hierarchy, for example by creating a new entry point within a role, the cache is no longer valid and must be cleared. The following options are available for clearing the cache:

Option

Procedure

Clear the cluster cache for all navigation connectors

In the main Navigation Cache screen, in the Cache Management section, choose Clear Cluster Cache .

Clear the cluster cache for a specific navigation connector

In the Navigation Connectors table, in the row containing the connector that you want to clear, choose Clear Cluster Cache .

Changing the cache configuration of a navigation connector and choosing Apply also clears the cluster cache for that connector. For more information, see the section Configuring the Cache in this topic.

Clear the local cache for all navigation connectors

In the main Navigation Cache screen, in the Cache Management section, choose Clear Local Cache .

Clear the local cache for a specific navigation connector

In the Navigation Connectors table, in the row containing the connector that you want to clear, choose Clear Local Cache .

Recommendation

If you make changes to the com.sap.portal.navigation.helperservice and com.sap.portal.navigation.service services while the navigation cache is enabled, you should clear the navigation cache to see your changes immediately.

Synchronizing the Cache

Synchronizing the cache clears and reloads the cache. If you know that changes have been made to navigation nodes or entry points in your portal, you can synchronize the cache with the new data in the PCD or other file system. In this way, you can make sure that performance issues do not arise when portal users log on after changes are implemented.

The following options are available for synchronizing the cache:

Option

Procedure

Synchronize the cache for all navigation connectors

In the main Navigation Cache screen, in the Cache Management section, choose Synchronize Cache .

Synchronize the cache for a specific navigation connector

In the Navigation Connectors table, in the row containing the connector that you want to clear, choose Synchronize Cache .

Note

These actions may not be available for all connectors. When creating the navigation connector, the developer can specify that the connector cannot be synchronized.

Configuring the Cache

You can change the default settings of the navigation cache for each navigation connector.

  1. In the Navigation Connectors table, in the row containing the connector that you want to configure, choose Configure .

    The Cache Configuration screen appears.

  2. You can perform the following actions:

    • Enable or disable the cache for the specific connector by choosing Enable/Disable Cache .

    • Configure the cache settings in the Navigation Nodes and Entry Points tabs:

      • Persistence : Choose where to save the cache entries:

        • Memory : Cache entries are saved in the memory of each cluster node.

        • Database : Cache entries are saved both in memory and to the database. We recommend that you use this setting if your system requires synchronization between cluster nodes.

      • Number of objects in cache : Specifies the maximum number of objects in the cache region.

        The default number of objects in the cache is 5000. We recommend that you set this value so that the expected number of objects in your portal is 70% of the maximum cache size.

      • Lifetime : Specify the time, in minutes, that the cache objects are valid.

        Note

        The configuration settings in the Entry Points and Navigation Nodes tabs do not have to be identical; however we recommend not to specify different Persistence settings.

  3. Choose Apply to save the new configuration.

Caution

Applying a new configuration clears the cache and cannot be undone.

Showing Cache Content

In the Cache Content screen, you can display a list of all the objects currently in the cache.

  1. In the Navigation Connectors table, in the row containing the connector whose contents you want to see, choose Show Content . The Cache Content screen appears.

  2. Using regular expressions, specify search criteria to find the objects that you want to view. You can search by key, by value, or by part of the node URL, for example, *myPage* . The search mechanism finds all of the matching objects that appear in the cache, including all of the navigation attributes that may be stored there, such as node title, launch URL, show type, and description.

    You can search the entire cache or limit the search to the results already displayed in the table. You can also limit the search to a specific cluster node.

  3. Choose Search .

    The results table displays the objects that match the specified search criteria.

    • To display the details of an object in the results table, choose the + icon next to the object.

    • To clear specific objects from the cache, select the checkbox next to the required objects and choose Clear Selected .

    • To synchronize specific objects in the cache, select the checkbox next to the required objects and choose Synchronize Selected .

Displaying Cache Statistics

You can display performance statistics for each connector's cache.

In the Navigation Connectors table, in the row containing the connector whose statistics you want to view, choose Statistics .

Activating the Cache Learning Mechanism

To improve the performance of the navigation cache, the cache learning mechanism records the navigation activities in your portal and stores cache-related properties. By default, the learning mechanism runs once a month over a period of two days.

For information about configuring the cache learning mechanism, see Configuring the Navigation Cache .

In the Learning Mechanism section, you can perform the following actions:

  • Choose Activate to activate the learning mechanism manually. The learning mechanism will run for a period of two days.

  • Choose Deactivate to stop the learning mechanism while it is running.

  • Choose Reset to remove the list of properties saved by the cache learning mechanism and return the cache to its original state.

Preloading Roles to the Cache

You can load all the roles of a specified user into the navigation cache before the user accesses the content. The service uploads roles and short URLs.

  1. In the Cache Preloader Service area, choose Configure .

  2. To make sure that the defined users always have the content that they need in the cache, even after the cache is cleared, select the Run the service after clearing the cache checkbox.

  3. To define a schedule for running the service, select the Run the service every [x] days checkbox, and specify how often you want the service to run.

  4. In the User Details section, define the users whose content you want to preload to the cache.

    1. Enter a User ID , and choose Validate .

    2. From the Additional Languages dropdown list, choose one of the languages in which you want content to be cached for this user and choose Add .

      The language is added to the Languages field.

    3. Repeat step 2 to add additional languages to the Languages field.

    4. To remove the defined languages, choose Remove All .

    5. In the Navigation Levels field, specify the number of navigation levels that you want to load to the cache.

    6. Choose Save User .

      The user details are saved and appear in the List of Users section.

  5. To edit a defined user, select the user in the List of Users section, and choose Edit .

    The user details appear in the User Details section where you can make your changes.

  6. Choose Save Configuration .

  7. To return to the main screen, choose Back to Cache Management .

To run the service manually, in the Cache Preloader Service section of the main cache management screen, choose Run Cache Preloader on Local Host or Run Cache Preloader on Cluster .