Cache invalidation can be based on time, user or other variables. There are four methods to invalidate the dyna cache.
Time based invalidation: This is useful when the cache entries cannot be invalidated by any other mechanism, or they should be refreshed after a set period. This method can be accomplished by specifying the <timeout>value</timeout> sub-element with a cache-entry in the cachespec.xml file
This is especially useful for user dependent cache entries where the an average user session duration can be specified as an inactivity timeout.
Command based invalidation: Invalidation occurs upon execution of a command, based on invalidation rules, that extends from the WebSphere Commerce Command Framework API. Invalidation IDs for command-based invalidation are constructed based on methods and fields provided by the commands. Such commands extend from CacheableCommandImpl.
Dynacache API and CACHEIVL table invalidation: WebSphere Application Server dynamic caching provides the following Java classes to support programmatic invalidation
Group based invalidation: Using dependency trees we can create conceptual groupings of the cache-entries, and invalidate based on those groups.
- Time based invalidation
- Command based invalidation
- Dynacache API and CACHEIVL table invalidation
- Group based invalidation
Time based invalidation: This is useful when the cache entries cannot be invalidated by any other mechanism, or they should be refreshed after a set period. This method can be accomplished by specifying the <timeout>value</timeout> sub-element with a cache-entry in the cachespec.xml file
This is especially useful for user dependent cache entries where the an average user session duration can be specified as an inactivity timeout.
Command based invalidation: Invalidation occurs upon execution of a command, based on invalidation rules, that extends from the WebSphere Commerce Command Framework API. Invalidation IDs for command-based invalidation are constructed based on methods and fields provided by the commands. Such commands extend from CacheableCommandImpl.
Dynacache API and CACHEIVL table invalidation: WebSphere Application Server dynamic caching provides the following Java classes to support programmatic invalidation
- com.ibm.websphere.cache.DistributedMap
- com.ibm.wsspi.cache.Cache
- com.ibm.websphere.cache.Cache
Group based invalidation: Using dependency trees we can create conceptual groupings of the cache-entries, and invalidate based on those groups.
No comments:
Post a Comment