Tree based cache invalidation

Problem, Question

Per default, the whole dispatcher cache is invalidated whenever a page is activated/deactivated. This behavior is not efficient for sites having independent content branches (eg. /site/en, /site/de, ...)

Resolution, Answer

To only invalidate a content branch of the dispatcher cache upon page replication, you can use the /statfileslevel parameter.

For example, if your site is multilingual, with independent branches :

  • /site/en
  • /site/de

You simply set in the dispatcher.any :

  /statfileslevel "1"

The dispatcher will create a .stat file below /site/<country>, which is used to invalidate the cache at the <country> level.

When a page from /site/en is replicated, the cache of the corresponding branch will be invalidated by the dispatcher. A request for a page below /site/en will be delivered through Communiqué. But a request for a page below /site/de will be delivered directly from the dispatcher cache.

See also the official dispatcher documentation :