Home
Time-based invalidation
The simplest way to invalidate cache entries is with time-based elements, although it is not necessarily the best way. This method is useful for user-specific objects when you cannot invalidate the cache entries by any other mechanism.
You can accomplish time-based invalidation by specifying the <timeout>value</timeout> sub-element within a cache-entry in the cachespec.xml file. Value is the amount of time, in seconds, the cache entry is kept in the cache. The default value for this element is 0 (zero), which indicates this entry never expires.
There is another time-based invalidation technique in WebSphere Application Server 5.1 and later. You can use the <inactivity>value</inactivity> sub-element to specify a time-to-live (TTL) value for the cache entry based on the last time the cache entry was accessed. Value is the amount of time, in seconds, to keep the cache entry in the cache after the last cache hit. The mini shopping cart should use this type of invalidation rule so that your cache does not fill up with user-specific data that is no longer being accessed.