Timed Memory Cache Provider

Last Updated: Oct 19, 2023
documentation for the dotCMS Content Management System

The Timed Memory cache provider implements a local memory-only cache for dotCMS which automatically evicts items from the cache after a configured timeout period. For more information on cache providers in dotCMS, see the Cache Chaining documentation.

The Timed Memory cache provider is based on the Caffeine cache provider, adding a timeout to the memory-only cache. The Timed Memory cache provider is included with dotCMS, but may only be enabled and configured by customers with an Enterprise license.

Configuration Properties

The following parameters in the configuration properties control the bahavior of the Timed Memory cache.

Cache Timeout Properties

The timeout used for each cache region is configured via properties of the following form:

cache.CACHE-REGION-NAME.seconds=TIMEOUT

Where:

  • CACHE-REGION-NAME specifies the name of the cache region.
    • See Cache Region Names in the Cache Chaining documentation for an explanation of how to find the property names for different cache regions.
  • TIMEOUT is specified in seconds.

Default Timeout

The cache.default.seconds property specifies the default timeout. This timeout will be used for any cache region which does not have its own timeout property configured.

cache.default.seconds=100

Cache Chain Properties

For dotCMS to use the Timed Cache provider, you must add com.dotmarketing.business.cache.provider.timedcache.TimedCacheProvider to the cache chain properties for the cache regions where you wish to use it. For example, to change the default chain to search the Timed Cache before the H22 Cache, change the default chain as follows:

cache.default.chain=com.dotmarketing.business.cache.provider.timedcache.TimedCacheProvider,com.dotmarketing.business.cache.provider.h22.H22Cache

For more information on how to configure cache regions to use the Timed Cache provider, see the Cache Chaining documentation.

On this page

×

We Dig Feedback

Selected excerpt:

×