Skip to Content
This is one in a series of weblogs on External Facing Portal, a new feature in SAP NetWeaver Portal SP14.


A significant part of implementing an External Facing Portal is simply to improve performance so the site isn’t a headache to use for public users — such as, potential customers and partners. One way the portal now tries to improve performance is to cache a user’s navigation hierarchy and nodes. The next time the user — or another user with the exact same navigation hierarchy — launches the framework page, the portal can take the navigation hierarchy from the cache instead of creating it from scratch. Navigation caching works in the background, and there’s not much you have to do — except turn it on!! For background information on navigation and navigation hierarchies, see Navigating in the Portal in the Portal Developer Guide on the Help Portal.

Administrator’s UI

The portal provides a UI for system administrators to check the status of the cache. image You can look up the following (corresponding J2EE property shown in parentheses):

  • Whether navigation caching is turned on (portal.navigation.cache.enable)
  • The maximum size of the navigation cache (portal.navigation.cache.lifetime)
  • For how long each object is valid (portal.navigation.cache.maxsize)

These settings are read-only, and can be changed using the SAP J2EE Visual Administration tool. image By default, navigation caching is turned off. Generally, there is a testing period, during which navigation hierarchies are changing, so it makes sense not to cache navigation nodes at this stage. After roles have been created and assigned and the portal is in production, you can turn on navigation caching.

Objects in the Cache

You can see a list of the navigation nodes currently in the cache, with the long name shown as a link. Click on the link to display the page that corresponds to the navigation node. For each node, you can click on the plus sign (+) and see information about the node, such as:

  • Title
  • Short URL
  • Children nodes
  • Merge ID

image

Clearing the Cache

If you make changes to an existing role — for example, by adding a page to a workset — you need to clear the cache for the change to take effect. If you don’t clear the cache, the navigation service will take the workset as it exists in the cache — without the changes. You do not have clear the cache if you are simply adding a user to a role, or creating a new role. To clear the cache, simply click Clear Cache. You cannot clear a single node.

Changes to Navigation Connector API

In order to add methods to the navigation connector API but keep the portal backward compatible with existing connectors, the existing INavigationConnector interface was unchanged. A new interface was created based on INavigationConnector, called INavigationConnectorExt. The interface defines two new methods, getNodeByQuickLink(), which is mentioned in another EFP: Quick Links about Quick Links, and getConnectorCacheDiscriminator() for enabling navigation caching for the connector. It is now recommended to create navigation connectors by extending the new class AbstractNavigationConnector instead of implementing the INavigationConnector or INavigationConnectorExt interfaces.

getConnectorCacheDiscriminator()

The getConnectorCacheDiscriminator() method returns a key — a String — for the set of nodes for the current user. The following is the signature:

public String getConnectorCacheDiscriminator(Hashtable environment);

You may want to create the navigation nodes — and, therefore, the cache discriminator — based on the current user. You can retrieve the IUser object for the current user from the Hashtable passed into the method, as follows:

IUser user = (IUser)
environment.get(INavigationConstants.NAVIGATION_PRINCIPAL);

The final discriminator that the Navigation service saves for a user’s entire collection of navigation nodes from all navigation connectors is a combination of the discriminators generated by all navigation connectors for the user’s set of navigation nodes.


The following are the weblogs in the series on External Facing Portal:


To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Martin Søgaard
    Hi Daniel

    The Navigation Caching will be done serverside, correct? Will it work even if you set Allow Client-Side Caching to False?

    As a side-question I would like to know if the caching on iview works at all in the portal (SPS11-13?) If I select the cache level “Shared” for a specific iview, the content of the iview will no longer be visible in the portal.

    Kind regards,
    Martin Søgaard

    (0) 
    1. Daniel Wroblewski Post author
      Hi Martin,

      Yes, navigation caching is done server side. It is unaffected by the general cache settings for iViews and iView content and it is either enabled/disabled based on the J2EE parameter.

      Daniel

      (0) 

Leave a Reply