Publish Cache

The feature Publish Cache improves the performance of rendering pages during the publish process by using additional caches.

1 Requirements and feature activation

The feature can be activated like this


$FEATURE["publish_cache"] = true;

Additionally, there are some other requirements:

2 Configuration of the extra cache regions

There are two extra cache regions, that will be used:

  • gentics-publishable-objects is the region for caching the pages
  • gentics-publishable-templates is used for caching the templates

2.1 Cache region gentics-publishable-objects

This cache region will contain every online page. For each page, a serialized version of the complete page data of the published version will be stored in a single cache entry.

It is recommended to use both an in-memory cache and a persistent disk based cache for this cache region. The example below sets the in-memory cache to a maximum of 50000 objects and the disk based cache to 1000000. The in-memory cache should not be too large, since it consumes heap memory of the Java process, whereas the disk based cache should be large enough to contain all pages.


# Region for publishable objects

# Cache for publishable objects

This region will be cleared at the start of the publish process, if the feature publish_cache is turned off.

If the feature is turned on for the first time (or after it had been turned off), the cache will be empty. During the initialization phase of rendering pages for a node, the raw data for all dirted pages, that are not contained in the cache will be collected, transformed into the cache entry (which resembles the REST model of the page object) and put into the cache. Depending on the number of dirted pages and the overall system performance this may take some extra time.

2.2 Cache region gentics-publishable-templates

This cache region will contain all templates, that are used during the publish process. For each template, a serialized version of the complete template data will be stored in a single cache entry.

It is recommended to use only an in-memory cache for this cache region, that is large enough to hold all templates existing.


# Region for publishable templates

This region will be cleared at the end of every publish process.

3 Clearing the caches for publishable objects

Using the default configuration, the cache for publishable objects is stored in the filesystem and will survive a restart of the system.

When the data in the database is changed, e.g. be importing a dump from another system or from a backup, it might be necessary to clear the cache. This can be done by manually deleting the files stored in the directory /Node/tomcat/temp/pub/ while the tomcat is stopped.