Cache Configuration documentation for the dotCMS Content Management System

Configuring the Cache

dotCMS maintains multiple different cache regions to improve performance by enabling efficient handling of different types of data and content. How these regions are configured depends on your version of dotCMS.

Community Edition

Community Edition uses a Caffeine cache for all cache regions. Community Edition does not support changing of cache parameters, and can not be configured to use a disk cache or a cache service such as Redis. For more information on how to configure cache parameters in Community Edition, please see the Caffeine Cache Provider documentation.

Enterprise Edition

By default, dotCMS Enterprise is configured to use a Caffeine memory-only cache for most cache regions, with certain specific cache regions configured to use a 2-layer cache that combines both memory cache (Caffeine) and disk cache (H2) to optimize performance for large and complex sites. In the dotCMS Enterprise version you may modify the cache chains, add new cache providers, configure custom cache chains, and specify different cache chains for different cache regions. For more information on how to configure cache parameters in dotCMS Enterprise Edition, please see the Cache Chaining documentation.

Cache Statistics

The cache statistics display information about the configuration and usage of your cache. To display cache statistics, open the Cache tab in System -> Maintenance.

The table in the Cache Stats section of the page displays the information related to the memory allocated and in use by the whole cache:

Total Memory Available29.6 G
Memory Allocated7.6 G
Filled Memory4.1 G
Free Memory3.5 G

To get information on individual cache regions, click the Refresh Stats button.

The tab displays a list of each cache region and its performance statistics:

RegionThe name of the cache region
ConfiguredNumber of objects that can be stored in the region
In MemoryNumber of object sthat are currently stored in memory in the region
On DiskNumber of objects that are currently stored on disk in the region
LoadNumber of times a cache lookup has been done to load a new value
Hit RateRatio of cache requests which were hits
Avg. Load TimeAverage load time from the region
EvictionsNumber of cache objects that have been evicted to make room for new items

If you check Calculate Memory Usage and click on Refresh Stats, you will also see the Size (total) and Average Object Size for each cache region.

Advanced Cache Methods

In addition to the built-in dotCMS cache, you may also implement advanced caching methods in your Velocity code. For information please see the Tag-Based Caching (Block Cache) documentation.