Troubleshoot and support > Cache > Dynamic caching in an application


Troubleshoot: Caching not working after updating cachespec.xml

To cache an object, WebSphere Application Server has to be able to generate unique IDs for different invocations of that object. The <cache-id> element performs this task. Each cache entry can have multiple cache-ID rules that execute in order until either a rule returns a non-empty cache-ID or no more rules remain to execute. If none of the cache-ID generation rules produce a valid cache ID, then the object is not cached.

For this release, when specifying the cache entry for command caching, only command invalidation using the <invalidate>...</invalidate> is supported. (You cannot use the <cache-id>...</cache-id> or <dependency-id>...</dependency-id> elements for command caching.)

<cache-entry> 
<class>command</class> 
<name>name</name> 
<invalidate> 
... 
</invalidate> 
</cache-entry>

The dynamic cache responds to changes in the cachespec.xml file. When new versions of cachespec.xml are detected, the old policies are replaced. Objects cached through the old policy file are not automatically invalidated from the cache. They are either reused with the new policy or eliminated from the cache through its replacement algorithm. See the cachespec.xml file topic in the WebSphere Application Server Information Center.

For requests using the PVC adapter (for a pervasive computing device), you can only use the URL parameters as the cache keys.


+

Search Tips   |   Advanced Search