When integrating content with WebCenter Portal it is important to deliver the content in a performant way. WebCenter Portal can do this by leveraging Coherence cache for content integration. This will allow a faster delivery of the content and by tweaking the cache setting it will also improve performance in WebCenter Content.
In this artice we will explain the different parameters for the cache and how they work together with WebCenter Content to deliver an optimized content cache.
Content integration is often a big part of portals build with WebCenter Portal. Therefore it is important to configure the caching of that content in a way that will provide the best performance.
This can be done by leveraging the caching of the content to Coherence cache.
In Configure Coherence for Oracle WebCenter Portal Framework content Presenter taskflow you can see how to enable Coherence for the content presenter. This is a prerequisite for this article.
In this article we will focus on optimizing the parameters of the Coherence cache so it suits the requirements of the business.
One of the most important parameters in the cache is its size. In coherence this is configured by the ContentNodeCaches local schema. This parameter will tell Coherence how many items from the content server will be stored in memory.
For an optimized setting of the size you need to look at the amount of content used on the portal.
As a guideline we recommend that you set the amount to at least 80% of the amount of items used in the portal. This will increase the hit count on the cache by a huge amount. This will limit the amount of requests done to the content server.
The draw back from this approach is that the memory consumption of the managed server will increase because all those content items need to be stored in memory. Therefore it is important to monitor the memory consumption during load testing. When your managed server is configured with at least 4GB memory they shouldn't be a problem with the above setting.
<local-scheme> <scheme-name>ContentNodeCaches</scheme-name> <expiry-delay>0</expiry-delay> <high-units>800</high-units> </local-scheme>
In the above example we estimate that there will be about 1000 content items used on the portal so we set the high-units to 800 to optimize the hit probability.
The expiry-delay parameter in coherence will invalidate the items in its cache on the interval defined in its parameter. It will replace all the items with a new version, even if those items were not changed during that interval. This means that there will be a lot of overhead traffic to the content server. If there are 800 nodes in the cache and the expire delay interval expired, Coherence will request those 800 nodes from the content server which leads to a lot of traffic.
In order to optimize this we need to set the expiry-delay to 0 which means that Coherence will never invalidate the cache. That responsibility will be transferred to the Content Server connection itself. This can be done in the Enterprise Manager by setting the Cache Invalidation Interval on the Content Repository connection as shown in the image below:
This interval will request a list of items that have been updated since the last invalidation. If the list is not empty, it will replace the nodes with the new nodes.
This configuration is much better because it will only request the nodes that have been updated since the last interval while the rest of the nodes will remain untouched. Because of this you can set the interval really low while not losing performance.
More information on the other parameters can be found in Managing Content Repositories.