Managing cache entries stored on a disk

Managing cache entries stored on a disk

Use this page to set Java virtual machine (JVM) custom properties to maintain cache entries that are saved to disk.

You can set the custom properties globally to affect all cache instances, or you can set the custom property on a single cache instance. In most cases, set the properties on the individual cache instances. To set the custom properties on the default cache instance, use the global option. If you set the same property both globally and on a cache instance, the value that is set on the cache instance overrides the global value.

To configure the custom properties on a single object cache instance or servlet cache instance...

  1. In the administrative console, click one of the following paths:

  2. Type the name of the custom property. When configuring these custom properties on a single cache instance, you do not use the full property path. For example, type htodCleanupFrequency to configure the com.ibm.ws.cache.CacheConfig.htodCleanupFrequency custom property.

  3. Type a valid value for the property in the Value field.

  4. Save the property and restart WebSphere Application Server.

To configure the custom property globally across all configured cache instances...

  1. In the administrative console, click Servers > Application servers > server_name > Java and process management > Process definition >
    Java virtual machine > Custom properties > New
    .

  2. Type the name of the custom property (for example, com.ibm.ws.cache.CacheConfig.htodCleanupFrequency) in the Name field.

  3. Type a valid value for the property in the Value field.

  4. Save the property and restart WebSphere Application Server.

com.ibm.ws.cache.CacheConfig.htodCleanupFrequency

Use this property to change the amount of time between disk cache cleanup. By default, the disk cache cleanup is scheduled to run at midnight to remove expired cache entries and cache entries that have not been accessed in the past 24 hours. However, if you have thousands of cache entries that might expire within one or two hours, the files that are in the disk cache can grow large and become unmanageable. Use the com.ibm.ws.cache.CacheConfig.htodCleanupFrequency custom property to change the time interval between disk cache cleanup.

Units minutes

For example, a value of 60 means 60 minutes between each disk cache cleanup.

Default 0

The disk cache cleanup occurs at midnight every 24 hours.

Tune the delay offload functionUse these properties to tune the delay offload function for the disk cache. The delay offload function uses extra memory buffers for dependency IDs and templates to delay the disk offload and minimize the input and output operations. However, if most of your cache IDs are longer than 100 bytes, the delay offload function might use too much memory. Use any combination of the following properties to tune your configuration:

com.ibm.ws.cache.CacheConfig.htodDelayOffloadEntriesLimit Use this property to specify the number of different cache IDs that can be saved in memory for the dependency ID and template buffers. Consider increasing this value if you have a lot of memory in your server and you want to increase the performance of your disk cache.

Units number of cache IDs

For example, a value of 1000 means that each dependency ID or template ID can have up to 1000 different cache IDs in memory.

Default 1000
Minimum 100

com.ibm.ws.cache.CacheConfig.htodDelayOffload

Use this property to specify if extra memory buffers should be used in memory for dependency IDs and templates to delay disk offload and to minimize input and output operations to the disk. This property is enabled by default. However, consider disabling this property if your cache IDs are larger than 100 bytes because this option might use too much memory when it buffers your data. If you set this property to false, all the cache entries are copied to disk immediately after they are removed from the memory cache.

Default true



Related reference
Troubleshooting tips for the dynamic cache service

Related information
Configuring dynamic cache disk offload

Searchable topic ID: rdyn_tunediskcache