Implementing Metadata Caching
Metadata caching is governed by portal-wide properties that control caching for these portal metadata objects as a group:
-
The portal registry.
-
Node definitions.
-
Content references.
-
Locally defined templates.
Portal metadata is likely to change far less frequently than pagelets or target content, so caching it on the server is an easy way to improve portal performance. Caching improves system performance by decreasing service requests from the web server to the application server.
Note:
Metadata caching always applies with the application scope—the portal maintains a single metadata cache for all users who are using an application.
You implement metadata caching for a portal by setting these properties in the On the Web Server group box of the Web Profile Configuration - Caching page:
| Field or Control | Description |
|---|---|
|
Cache Portal Objects |
Select to enable metadata caching. Metadata caching is enabled by default. You must restart the web server or wait for the stale interval to expire when you change:
Note: When you add or delete a content reference or folder, this change shows up in the menu structure immediately because it's rendered within the application server, not the portal servlet. |
|
Cache Stale Interval |
Specify the number of seconds that should pass before the portal refreshes the metadata cache. The default value of this property is 86400 (24 hours). With this setting, if you change the default local node in the database, the change doesn't take effect until the following day. |
|
Cache Purge All Hit Count |
Set to the maximum total number of HTTP requests that the web server should receive for objects in the metadata caches of all portals. When the web server receives this number of hits, it purges all metadata caches, forcing the portals to refresh them. This setting enables you to manage application server memory consumption. If the web server is consuming too much memory, you can lower this value. This causes the web server to reclaim the memory that is used for cached portal objects more often. The cost of this is increased CPU usage on both the web and the application server when the web server deletes the cached objects and then retrieves them again from the application server. The default value of this property is 1000. Set to –1 to disable the feature. |
Note:
The timing properties—the cache stale interval and the cache purge all hit count—compete for effect. The first timing property to reach the specified interval or number of hits takes precedence. When the metadata cache on a portal is refreshed, the cache stale interval and cache purge all hit count counters for all portals on the same web server are reset.
Related Topics