Servlet cache instance settings

A servlet cache instance is a location, in addition to the default shared dynamic cache, where dynamic cache can store, distribute, and share data. By using servlet cache instances, your applications have greater flexibility and better tuning of the cache resources. The Java Naming and Directory Interface (JNDI) name specified for the cache instance is mapped to the name attribute in the <cache-instance> tag in the cachespec.xml configuration file.

To view this administrative console page, click Resources > Cache instances > Servlet cache instances > cache_instance_name.

Name

Specifies the required display name for the resource.

JNDI name

Specifies the Java Naming and Directory Interface (JNDI) name for the resource. Specify this name in the name attribute field in the <cache-instance> tag in the cachespec.xml configuration file. This tag is used to find the particular cache instance in which to store cache entries.

Description

Specifies a description for the resource. This field is optional.

Category

Specifies a category string to classify or group the resource. This field is optional.

Cache size

Specifies a positive integer for the maximum number of entries the cache holds. The cache size is usually in the thousands.

Default 2000
Range 100 - no set maximum value

Default priority

Default priority for servlets that can be cached. This value determines how long an entry stays in a full cache.

The recommended value is one.

Disk offload

Specifies if disk offloading is enabled.

If you have disk offload disabled, when a new entry is created while the cache is full, the priorities are configured for each entry and the least recently used algorithm are used to remove the entry from the cache in memory. If you enable disk offload, the entry that would be removed from the cache is copied to the local file system. The location of the file is specified by the disk offload location.

Default false

Disk offload location

Directory used for disk offload.

If disk offload location is not specified, the default location, $install_root/temp/node/servername/_dynacache/cacheJNDIname will be used. If disk offload location is specified, the node, server name, and cache instance name are appended. For example, $install_root/diskoffload generates the location as $install_root/diskoffload/node/servername/cacheJNDIname. This value is ignored if disk offload is not enabled.

Flush to disk

Specifies if in-memory cached objects are saved to disk when the server is stopped. This value is ignored if Enable Disk Offload is not selected.

Default false

Use listener context

Set this value to true to have invalidation events sent to registered invalidation listeners using the J2EE context of the listener. If you want to use listener J2EE context for callback, set this value to true. If you want to use the caller thread context for callback, set this to false.

Dependency ID support

Specifies that the dynamic cache service, supports cache entry dependency IDs. Disable this option if you do not need to use dependency IDs. Dependency IDs specify additional cache group identifiers that associate multiple cache entries to the same group identifier in your cache policy.

This option might not be available for cache instances that were created with a previous version of WebSphere Application Server.

Default true

Enable cache replication

Use cache replication to enable sharing of cache IDs, cache entries, and cache invalidations with other servers in the same replication domain.

This option might be unavailable for cache instances created with a previous version of WebSphere Application Server.

Replication domain

Specifies a replication domain from which your data is replicated.

Specifies a replication domain from which your data is replicated. Choose from any replication domains that have been defined. If there are no replication domains listed, create one during cluster creation or manually in the administrative console by clicking Environment > Internal replication domains > New. The replication domain you choose to use with the dynamic cache service must be using a Full group replica. Do not share replication domains between replication consumers. Dynamic cache should use a different replication domain from session manager or stateful session beans.

Replication type

Specifies the global sharing policy for this cache instance.

The following settings are available:

  • Both push and pull sends the cache ID of newly updated content to other servers in the replication domain. Then, if one of the other servers requests the content, and that server has the ID of the cache entry for the previously updated content, it will retrieve the content from the publishing server. If a request is made for an ID which has not been previously published, the server assumes it does not exist in the cluster and creates a new entry.

  • Pull only shares cache entries for this object between application servers on demand. If an application server gets a cache miss for this object, it queries the cooperating application servers to see if they have the object. If no application server has a cached copy of the object, the original application server runs the request and generates the object. These entries cannot store non-serializable data. This mode of sharing is not recommended.

  • Push only sends the cache ID and cache content of new content to all other servers in the replication domain.

  • The sharing policy of Not Shared results in the cache ID and cache content not being shared with other servers in the replication domain.

The default setting for a an environment without clustering is Not Shared. When enabling replication, the default value is Not Shared.

Push frequency

Specifies the time in seconds to wait before pushing new or modified cache entries to other servers.

A value of 0 (zero) means send the cache entries immediately. Setting this property to a value greater than 0 (zero) causes a "batch" push of all cache entries that are created or modified during the time period. The default is 0 (zero).