Home | 2.6.4 Cache IDs and the cache hit | 2.6.6 Dependency ID overview <dependency-id>


2.6.5 Cache programming support

DynaCache provides other capabilities in addition to servlet and JSP caching. Cache IDs also define how information is obtained programmatically from Cacheable Command objects, that is, objects that implement the DynaCache Command interface. There is more coverage on Command objects later.

In summary, for an object to be cached, DynaCache must know how to generate a unique ID for different invocations of that object.

Cache IDs can be developed in one of the following ways:

Although each cache entry may have multiple cache-ID rules, only one of the entries in the list of rules is executed at any one time. DynaCache searches through the list of cache IDs in the exact order you defined them in the cachespec.xml file. It keeps looking for a rule until it finds one that matches, or it exhausts the list.

In the case where none of the <cache-id> generation rules produce a matching cache ID, then the object is not cached.

+

Search Tips   |   Advanced Search