Caching the list of publications

Each time the Collaborative Review main page is loaded, the list of publications needs to be retrieved, and that may impact performance. This is why this list is cached.

20 Mb of RAM memory is dedicated to store the content of pub.xml in order to let the main page load faster. At Collaborative Review startup PublicationResource.getPublicationList fetches the pub list and puts it in the cache. The cache has no time limitation. It can however be disabled.

Each publication in the list is stored individually, and is deleted then loaded again whenever one of the following change occur:
  • Visibility changed;
  • Version changed;
  • Language added/removed
  • Publication added/removed;
  • Publication prepared;
  • Configuration changed.
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.properties configuration file:

caching.publicationlist.enabled=true

ehcache.xml

There is a list of cache parameters that you can set in the \WEB-INF\classes\ehcache.xml configuration file.

Parameter nameDescriptionDefault value
maxBytesLocalHeapThe maximum memory for the cache, in megabytes.20m (20 Mb)
eternalWhether a time limitation applies to the cache or not. If set to false then you need to use timeToLiveSeconds for specifying the delay size.true