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 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.
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.
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 Available||29.6 G|
|Memory Allocated||7.6 G|
|Filled Memory||4.1 G|
|Free Memory||3.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:
|Region||The name of the cache region|
|Configured||Number of objects that can be stored in the region|
|In Memory||Number of object sthat are currently stored in memory in the region|
|On Disk||Number of objects that are currently stored on disk in the region|
|Load||Number of times a cache lookup has been done to load a new value|
|Hit Rate||Ratio of cache requests which were hits|
|Avg. Load Time||Average load time from the region|
|Evictions||Number 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.