InfoCenter Home >
6: Administer applications >
6.6: Tools and resources quick reference >
6.6.8: Administering Web modules (overview) >
6.6.8.0: Web module properties >
6.6.8.0.18: Assembly properties for servlet caching configurations

6.6.8.0.18: Assembly properties for servlet caching configurations

Dynamic caching can be used to improve the performance of servlet and JavaServer Pages (JSP) files by serving requests from an in-memory cache. Cache entries contain the servlet's output, results of the servlet's execution, and metadata.

The properties on the General tab define a cache group and govern how long an entry remains in the cache. The properties on the ID Generation tab define how cache IDs are built and the criteria used to cache or invalidate entries. The properties on the Advanced tab define external cache groups and specify custom interfaces for handling servlet caching.

Caching group name (Required, String)
Specifies a name for the group of servlets or JSP files to be cached.

Priority
An integer that defines the default priority for servlets that are cached. The default value is 1. Priority is an extension of the Least Recently Used (LRU) caching algorithm. It represents the number of cycles through the LRU algorithm that an entry is guaranteed to stay in the cache. The priority represents the length of time that an entry remains in the cache before being eligible for removal. On each cycle of the algorithm, the priority of an entry is decremented. When the priority reaches zero, the entry is eligible for invalidation. If an entry is requested while in the cache, its priority is reset to the priority value. Regardless of the priority value and the number of requests, an entry is invalidated when its timeout occurs. Consider increasing the priority of a servlet or JSP file when it is difficult to calculate the output of the servlet or JSP file or when the servlet or JSP file is executed more often than average. Priority values should be low. Higher values do not yield much improvement but use extra LRU cycles. Use timeout to guarantee the validity of an entry. Use priority to rank the relative importance of one entry to other entries. Giving all entries equal priority results in a standard LRU cache that increases performance significantly.

Timeout
Specifies the length of time, in seconds, that a cache entry is to remain in the cache after it has been created. When this time elapses, the entry is removed from the cache. If the timeout is zero or a negative number, the entry does not time out. It is removed when the cache is full or programmatically, from within an application.

Invalidate only
Specifies that invalidations for a servlet are to take place, but that no caching is to be performed for the servlet. For example, this property can be used to prevent caching of control servlets. Control servlets treat HTTP requests as commands and execute those commands. By default, this checkbox is not selected.

Caching group members
Specifies the names of the servlets or JSP files to be cached. The URIs are determined from the servlet mappings.

Use URIs for cache ID building
Specifies whether or not the URI of the requested servlet is to be used to create a cache ID. By default, URIs are used.

Use specified string
Specifies a string representing a combination of request and session variables that are to be used to create cache IDs. (This property defines request and session variables, and the cache uses the values of these variables to create IDs for the entries.)

Variables - ID
The name of a request parameter, request attribute, session parameter, or cookie.

Variables - Type
Indicates the type of variable specified in the ID field. The valid values are Request parameter, Request attribute, Session parameter, or Cookie.

Variables - Method
The name of a method in the request attribute or session parameter. The output of this method is used to generate cache entry IDs. If this value is not specified, the toString method is used by default.

Variables - Data ID
Specifies a string that, combined with the value of the variable, generates a group name for the cache entry. The cache entry is placed in this group. This group can later be invalidated.

Variables - Invalidate ID
Specifies a string that is combined with the value of the variable on the request or session to form a group name. The cache invalidates the group name.

Required
Indicates whether a value must be present in the request. If this checkbox is selected, and either the request parameter, request attribute, or session parameter is not specified, or the method is not specified, the request is not cached.

External cache groups - Group name
Specifies the name of the external cache group to which this servlet will be published.

ID generator
Specifies a user-written interface for handling parameters, attributes, and sessions. The value must be a full package and class name of a class extending com.ibm.websphere.servlet.cache.IdGenerator. The properties specified in the Application Assembly Tool will still be used and passed to the IdGenerator in the initialize method inside a com.ibm.websphere.servlet.cache.CacheConfig object.

Meta data generator
Specifies a user-written interface for handling invalidation, priority levels, and external cache groups. The value must be the full package and class name of a class extending com.ibm.websphere.servlet.cache.MetaDataGenerator. The properties specified in the Application Assembly Tool will still be used and passed to the MetaDataGenerator in the initialize method inside a com.ibm.websphere.servlet.cache.CacheConfig object.
Go to previous article: 6.6.8.0.17: Assembly properties for invoker attributes Go to next article: Assembly properties for Web modules

 

 
Go to previous article: 6.6.8.0.17: Assembly properties for invoker attributes Go to next article: Assembly properties for Web modules