CQ Dispatcher Flush Agent Set Up

CQ Dispatcher

CQ Dispatcher Flush Setup

CQ Flush Agent is required to invalidate / clean dispatcher cache. Before you set dispatcher Flush make sure that replication agent is set up properly as discussed in last lesson. It is recommended to configure dispatcher flush agent on publish instance.

Configure Dispatcher Flush On Publish:

  • Go to HOST:PORT/libs/cq/core/content/login.html
  • Login as admin / admin
  • Then click on Tools -> Replications -> Agents on Publish (You can also go to HOST:PORT/miscadmin#/etc/replication/agents.publish)
  • You can then click on new -> Page -> Give Dispatcher Agent Information
  • Once page is created, Double click on dispatcher flush agent and then click on edit
  • On first Tab (Dispatcher Settings) tab. Have following setting. Serialization Type tells CQ that this is dispatcher flush agent and not normal replication agent.
  • Then on transport tab and enter dispatcher server URL. URL is HOST:PORT/invalidate_only/dispatcher/invalidate.cache when this request reaches dispatcher, Dispatcher module knows that it is flush request and then it invalidate cache.
  • From Trigger Tab set following triggers. This is required if you are setting dispatcher flush agent on publish instance (But not if you are setting it on author). Through these trigger replication agent knows when to trigger flush.
  • Once all settings is done you can select dispatcher flush agent and click on replicate (Make sure that replication agent is configured before and you see green light at the end of replication).
  • You can then create multiple flush agent using above steps.
  • Note that dispatcher flush only happens on resources of type cq:Page on publish instance. If you have to enable flushing of DAM resource as well then please check this article. http://helpx.adobe.com/cq/kb/HowToFlushAssetsPublish.html

Some Dispatcher Flush Configuration on dispatcher.any file

All dispatcher specific configuration can be obtained from this document http://dev.day.com/docs/en/cq/current/deploying/dispatcher/disp_config.html Please go through this carefully.

We will cover some configuration that can effect caching,

  • /cache section

Dispatcher Flush config

/cache { /docroot "/opt/dispatcher/cache" /statfile "/tmp/dispatcher-website.stat" /allowAuthorized "0" /rules { # List of files that are cached example


#/0001 #{ #/glob "*.html" #/type "allow" #}

# allow *.html this mean cache all file with .html extension

#deny *.txt this mean that do not cache any file with txt extension

#deny */private/* this mean that do not cache any document that has /private/ in URI } /invalidate { # List of files that are auto-invalidated Example


#/0001 #{ #/glob "*.html" #/type "allow" #} #}

#allow *.html mean, for dispatcher flush request all html files will get invalidated. }