Cache dependencies cause performance problems

Issue

When you activate the homepage, performance is poor.

Solution

Tune caching by doing one of the following:

  • Ignore dependencies for the homepage by modifying the ignoredeps section in /config/delivery/cache.xml.
  • Reduce calls to ticket.getPage and ticket.getChildren.
  • Turn off the Communiqué cache, but fine tune the dispatcher cache.

Additional information

Activating a page high in the site hierarchy causes not only the corresponding cache to be flushed, but all cache dependencies as well. When there are many dependencies, this flushing can be intensive.

The Communiqué cache manager can handle dependencies between content pages. Therefore, whenever page A is modified, all cache entries that list A as one of their dependencies are flushed. Having many dependencies leads to a poor cache flush behavior. When a page is modified on the publish instance (because it has been activated from the author instance), the following happens:

  • The page itself is flushed with all its resources.
  • All cache entries listing page A as one of their dependencies are flushed.

You can check the cache dependencies using the JMX interface, running on port 8090 of the Communiqué instance (/config/management.xml for its configuration):

  1. Under com.day.cq.deliverymodule, click name=com.day.cq.delivery.cachehandler.CacheHandler. Here, you can list the dependencies of a particular page handle with the getDependencies button.

To reduce the cache dependencies, check in the templates. See if you can avoid or minimize any method calls involving access to a page; especially ticket.getPage or ticket.getChildren calls.

 Adobe

更快、更輕鬆地獲得協助

新的使用者?