Cache Configuration documentation for the dotCMS Content Management System

dotCMS maintains multiple different cache regions to improve performance by enabling efficient handling of different types of data and content.

Default Cache Configuration

The default cache configuration 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
  • Certain specific cache regions are configured to use a two-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:

ColumnDescription
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.

Flushing the Cache

You may manually flush the cache to force dotCMS to re-populate the cache from the database. When you flush the cache, you can choose to flush All Caches, or to select a single cache region to flush. The following table explains what type of object and/or content is stored in each of the cache regions you may choose from.

Cache RegionType of Objects or Content it Contains
ApiTokenCacheJWT Api Tokens
AppsConfiguration for Apps (YAML)
Block DirectiveBlock Cache contents
Block PagePage delivery information (user, language, version, etc.)
CategoryCategories
ContainerContainers (both standard Containers and file-based Containers)
ContentletContent items (including both properties and metadata)
ESQueryCacheElasticsearch queries (including both query strings and results)
FolderCacheFolders
HostSite properties
Host VariablesSite Variables
IdentifierIdentifiers, inodes, and Version Info for all content
IndicesElasticsearch Index configuration (not the contents of the indexes)
Key/Value CacheKey/Value fields (maps keys to their associated values)
LanguageLanguages
LayoutPage Layouts (how Containers are laid out within each Page)
Legacy Content TypeLegacy Content Types (structures)
LogMapperLog Mappers associated with the Visitor, Activity, Admin, Push Publishing, and Security log files.
MenuLinkCacheMenu Links
MultiTree CacheInformation about which content items exist in each Container in a Page
Navigation ToolNavigation information (used to build menus, crumbtrails, etc. with the navtool)
New Content Type CacheContent Types
NewNotification CacheNotifications
PagePage Properties (not the generated HTML)
PermissionPermissions
PluginStatic plugins (the OSGI framework handles caching of dynamic plugins)
PortletCachePortlets (e.g. Tools in the Roles & Tools configuration)
Processed CSS CachePre-processed CSS (e.g. SASS output)
PublishingEndPoint CachePush Publishing Endpoints
PushedAssets CacheAssets that have been Push Published
RelationshipRelationship Fiels (not legacy Relationships)
RoleUser Roles
Rules CacheRules
TagTags
TagInodeiNodes for Tags (to completely flush Tag caches, flush both this region and the Tag region)
TemplateTemplates
UserUsers
Vanity URL CacheVanity URLs
Velocity2Velocity code (the raw Velocity code, not the HTML or other text generated when the code is run)
Workflow CacheWorkflows (Schemes, Steps, Actions, etc.)

Deprecated Cache Regions

In addition, the following cache regions are maintained in the list for backward compatibility:

Cache RegionDescription
CMS RoleThis is an alias for the Roles region, maintained for backward compatibility;
Clearing this region clears the Roles region (see above)
Navigation Tool2No longer used; maintained for backward compatibility
Rules Engine - Site VisitsNo longer used; maintained for backward compatibility
SystemNo longer used; maintained for backward compatibility
User ProxyNo longer used; maintained for backward compatibility
VersionableNo longer used; maintained for backward compatibility

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.