Home


6.10.5 Cache entry IDs

To cache an object, the application server must know how to generate a unique ID for different invocations of that object. These IDs are built either from user-written custom Java code or from rules that are defined in the cache policy of each cache entry. (Note that custom Java code needs to be placed into a shared library.)

Each cache entry can have multiple cache ID rules that run in order until either a rule returns a non-empty cache ID, or no more rules are left to run. If none of the cache ID generation rules produce a valid cache ID, the object is not cached.

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

Component

Timeout

Inactivity

Priority

Property

Idgenerator

Metadatagenerator

Example | -21 illustrates a cache-id element.

Example 6-21 cache-id definition grammar

<cache-id>
   component* | timeout? | inactivity? | priority? | property* | idgenerator? | metadatagenerator?
</cache-id>

In this example, * = zero or more, | = or, and ? = value.

+

Search Tips   |   Advanced Search