Caching topics and table of contents
A request to the Table of Contents (TOC) in the database is made each time you select a topic in the table. This query may take some time, and the repetition of it slows down the global performance. A cache storing topics and the table of contents has been created in order to reduce the impact of table of contents navigation on the performance due to those database calls.
Two types of caches have been created, they can be accessed separately but share a number of parameters:
- A cache storing tables of contents.
- A cache storing topics.
The TOC cache is further divided into a TOC cache and a TOC_UUID cache (UUID: Universally Unique IDentifier). The TOC cache stores all items in the TOC for the depth levels specified in the global configuration (parameter content.toc.depth). The TOC_UUID cache stores all items that are accessed by the reader for levels deeper than the depth specified in the global configuration. TOC_UUID also stores information used for breadcrumb management.
Cache information is available in a page that you can access through in Legacy Content Delivery .
config.properties-
By default, this caching is set on at installation, but can be turned off anytime (values:
true/false), in the\WEB-INF\config.propertiesconfiguration file:caching.toc.active=trueYou can also set in
\WEB-INF\config.propertiesthe maximum duration during which XSL templates will be stored (in milliseconds):caching.templates.millis=3600000 ehcache.xml-
There are lists of cache parameters available in the \WEB-INF\classes\ehcache.xml configuration file, one list for each type of cache. The cache names for TOC and topics are:
TOCfor table of contents at the set depth level,TOC_UUIDfor TOC elements deeper than the set depth level, andTOPICfor individual topics. All parameters can be used, and can be set to different values, for each type of cache.Some of those parameters can be adapted to better optimize performance. Other parameters are better left as they are.
You can set the following:Parameter name Description Default value maxBytesLocalHeap The maximum memory for the cache, in megabytes. 50m(50 Mb) for TOC,20mfor topicsmaxBytesLocalDisk The maximum disk space for the cache. No default. maxEntriesLocalDisk The maximum number of stored items. They will be stored on the local disk if the memory is insufficient. 50(50 items) for TOC,5000for topicstimeToLiveSeconds The maximum duration during which the item will be stored (if there is no access), in seconds. 36000(36000 seconds)timeToIdleSeconds The maximum duration during which the item will be stored after the last access, in seconds. 3600(3600 seconds)diskSpoolBufferSizeMB The size of disk space used as buffer. 20(20 Mb)It is recommended never to change the following:Parameter name Description Default value memoryStoreEvictionPolicy The eviction policy used when the cache is full. LFU(Least Frequently Used)transactionalMode Whether or not the cached content is locked whenever there is an update from the database (insures no reader accesses a content different from what is in the database). off(no lock)statistics When set to true, gathers info on cache use for statistical purposes.true