Home | 2.6.1 Basic structure of the cachespec.xml file. | 2.6.3 Cache ID Overview


2.6.2 Cache entry element overview <cache-entry>

The DynaCache service parses the cachespec.xml file during startup, and extracts a set of configuration parameters from each <cache-entry> element.

A cachespec.xml file can have one or several cache entries placed in it. Each <cache-entry> element defines how we are going to cache some object on our Web site. An object could be a servlet, a JSP, or some other Java-based object such as an EJB or Web service.

Each <cache-id> element defines a rule for caching an object and is composed of the following sub-elements:

The <component> sub-element can appear many times within the <cache-id> element. Each time it specifies how to generate a component of a cache ID. There are several different types of component elements, such as:

The <timeout>, <priority>, and <property> sub-elements can be used to control the cache entry expiry, cache eviction policy, and other generic properties for a cached object with an identifier generated by its enclosing <cache-id> element.

Each cache entry has its own properties, including things like its:

Therefore, in each cache entry, we will find one or more cache identifiers that uniquely identify what is to be cached. Beyond the list of properties, you may encounter dependency or invalidation rules that tell DynaCache how and when to remove an item and any group of dependent items from the cache.

The following pattern, expressed in pseudo XML, typically repeats for each cache-entry you encounter:

<cache-entry>

    < name and properties> 
    < list of cache-id`s>
    < list dependency-id's> optional
    < list of invalidation rules> optional

</cache-entry>

+

Search Tips   |   Advanced Search