Configuring Caching for the Federated
PortalApplicable to: remote role assignment, remote delta link
SAP NetWeaver Portal provides a dedicated caching service for the consumer portals running in a federated portal scenario. Its purpose is to reduce network traffic to the producer by storing semantic objects on the consumer-side for reuse.
This topic describes how to define consumer-side cache settings and to manually clear or synchronize the cache, if needed.
Note the following:
● Clearing the cache refers to roles consumed through remote role assignment, while synchronizing the cache refers to remote delta links.
● Once remote-based content has been cached on the consumer, any changes made to their source objects on the producer are only updated on the consumer after its cache has been updated; after a scheduled synchronization, manual synchronization, or if the cache validity expires.
● In remote delta link mode, the producer portal also caches objects to reduce the number round-trips between the producer and consumer. There are no cache settings on the producer that administrators can configure to change this behavior.
● The cache settings described below define are global settings; you cannot define a different configuration for each producer you work with.
For general information about caching in a federated portal environment, such as support for a clustered environment and the risks involved, see Federated Portal Caching. Additional cache-related settings are described in Optimizing Your Consumer Profile.
To configure cache settings:
● You have access to the SAP NetWeaver Administrator tool.
● You have access to the federated portal administration tools in the standard System Admin role on your portal.
To clear and synchronize the cache:
● You have access to the federated portal administration tools in the standard System Admin role on your portal.
The cache settings described here determine the size of the content cache, where the cache is stored, and the time at which objects are kept in cache until they are invalidated. These cache settings apply to:
● Runtime content that has been cached on the consumer through the use of the remote role assignment mode.
● Content viewed through a remote Portal Catalog on a consumer portal (refers to the remote delta link mode). See Copying Remote Content to Your Consumer.
● Specific remote delta link use cases, such as SAP transaction iViews embedded in remote delta link pages, whereby the Application Integration service retrieves properties from objects located in the Portal Content Directory (PCD) of the remote producer.
Step 1: Perform the following in the SAPNetWeaver Administrator tool:
...
1. In the SAP NetWeaver Administrator tool, access the following portal application and service:
○ Portal application: com.sap.portal.ivs.global.gpcache
○ Service: FederatedPortalCache
For
information about accessing and configuring portal services in the
SAP NetWeaver Administrator tool, see
Accessing Portal
Services in SAP NetWeaver Administrator.
2. Define the following properties:
Property |
Description |
maxCacheSize |
Specifies the maximum number of Java objects that can be stored in memory cache. Note that a number of Java objects per role are stored in the cache; this number varies according to the portal runtime and implementation of the portal's navigation framework. When the memory cache is full, the first-in-first-out (FIFO) method applies. Do not enter zero or a negative value. Default value: 10,000 |
maxValidityPeriodInSec |
Specifies the maximum amount of time (in seconds) a cached object stays in the cache until it is invalidated.
This property is only valid when the Cache Lifetime setting in the Cache Configuration iView (see below for details) is set to 0 or any negative value; otherwise it is ignored. Typically, you would set a short validity time if you know the remote content on the producer is dynamic and changes frequently over a short period of time. You would set a long validity time if you know the remote content on the producer is static and undergoes fewer changes over a long period of time. This rule of thumb also applies to the Cache Lifetime property.
If you prefer
the Portal Runtime (PRT)
to control the cache validity for FPN-related content, set the Cache Lifetime
property to 0 or a negative value, and set the maxValidityPeriodInSec
to -1. The cache validity period defined by the
PRT is then determined by the product of two
PRT property values: caching.persistency.clean.period
and caching.persistency.infinite.validity.clean.period.factor. The default value is 12 hours
(from 5 min * 144
min). For more
information, see
|
cachePersistency |
Specifies if cached objects are stored in memory cache only or in both memory cache and persistence cache (in the database). Valid values are as follows: ● true: Cached objects are stored in both memory cache and database cache. ● false: Cached objects are stored in memory cache only. Use of the cache persistency is mandatory if you are supporting a clustered environment. The cache persistency is useful for other purposes. For more information, see Federated Portal Caching. |
3. Save your changes.
Step 2: Perform the following in the portal:
...
1. In the portal, navigate to System Administration → Federated Portal → Myself as Content Consumer → Cache Management.
2. Enter a value in the Cache Lifetime property (in seconds) that specifies the maximum amount of time the cache content remains in the consumer portal until it is invalidated.

If you enter a value greater than zero, then the Cache Lifetime property setting overrides any time set in the PRT or in the maxValidityPeriodInSec in the FederatedPortalCache service. If you set Cache Lifetime to zero, the maxValidityPeriodInSec or PRT (as described above) determines the overall validity period of cached objects.
3. Click Save.
The Cache Lifetime setting in the Cache Management iView and the properties in the FederatedPortalCache service determine the frequency at which the cache of remotely assigned roles is cleared automatically. There are also times when you may you want to manually clear the cached content of roles that you have consumed through remote role assignment before their cache lifetime expectancy has been reached. For example, if you know that a producer has updated content you are consuming, you can clear the cache to ensure that all data changes are immediately updated on your consumer and that your users are working with the most up-to-date content.
As mentioned above, the Cache Lifetime setting and the properties in the FederatedPortalCache service also have an effect on specific remote delta link use cases. For example, if a content administrator on the consumer portal has made a change to an application property in a SAP transaction iView of type remote delta link, the administrator should clear the cache manually before the cache lifetime expectancy has been reached, so that business users run the iView with the most up-to-date values. The procedure described below also applies to the clearing of cached data for the aforementioned remote delta link instances.

■ After you clear the cache, portal users may notice an initial increase in the time it takes for remotely assigned role content to be retrieved from the producer portal. As the cache is rebuilt on the consumer over time, the runtime performance improves.
■ Users must restart any live portal sessions to receive the latest updates after clearing the cache.
To clear the cache for remote role assignment usage and limited remote delta link use cases, do the following:
...
1. In the consumer portal, navigate to System Administration → Federated Portal → Myself as Content Consumer → Cache Management.
2. In the Content Cache iView, click Clear Remote Role Assignment' Cache.

Remote content displayed in the NetWeaver Content Producers folder in the Portal Catalog enables you to create remote delta link content on the consumer portal. If you are having problems when viewing content in the NetWeaver Content Producers folder, such as content not updating itself or the Portal Catalog being empty after refreshing, you can use the Clear 'Remote Role Assignment' Cache feature to solve the problem.
The cache settings in the OriginalContentSynConsumerService service define the frequency at which remote delta link content on the producer is updated with modifications made to their source objects on a producer portal.
The producer portal automatically updates content modifications made to source objects with their corresponding target delta link objects on the consumer portal once every 24 hours. A system administrator on the consumer can do the following:
· Change the default interval at which remote delta link content is updated on the consumer portal.
· Manually synchronize remote delta link content with their corresponding source objects.
An administrator on the producer portal cannot initiate a content update with its registered consumer portals.

■ Synchronization can be a very time consuming process, especially if you have consumed large amounts of remote delta link content.
■ Users must restart any live portal sessions to receive the latest updates after synchronizing the cache.
To manually synchronize remote delta link content:
...
1. In the consumer portal, navigate to System Administration → Federated Portal → Myself as Content Consumer → Cache Management.
2. In the Content Cache iView, click Synchronize 'Remote Delta Link' Content.
To change the automatic synchronization interval of remote delta link content:
...
a. In the SAP NetWeaver Administrator tool, access the following portal application and service:
■ Portal application: com.sap.portal.fpn.contentmanagement
■ Service: OriginalContentSynConsumerService
For
information about accessing and configuring portal services in the
SAP NetWeaver Administrator tool, see
Accessing Portal
Services in SAP NetWeaver Administrator.
b. In the sampleDelayMinutes property, enter the time delay in minutes from when the server starts up to when the first automatic synchronization takes place. The default value is 1,440 minutes (= 24 hours).

Enter a positive value only.
c. In the sampleRateMinutes property, enter the synchronization interval in minutes. The default value is 1,440 minutes (= 24 hours).

To turn off the automatic synchronization, enter 0 or -1.
d. Save your changes.