Expand my Community achievements bar.

How to Flush Dispatcher Cache for changes done in CSS/JS files?

Avatar

Level 3

Dispatcher flush agent usually sends an invalidation requests whenever your HTML files are changes i.e. for changes done cq:page nodes, your dispatcher flush agent will trigger and invalidate the cache. For changes done in CSS and JS files, the process isn't the same. Dispatcher flush agent could be set so as to trigger on modification but still there might be a case wherein your CSS or JS files are not invalidated/evicted from dispatcher cache.

In order to workaround this issue, you can easily create a workflow model and a workflow launcher.

The workflow model will contain a process step that will call the /etc/workflow/scripts/dam/flush_asset.ecma script. The launcher can call this newly created workflow each time, some file in your scripts directory is modified.

You can also refer to the attached package and screenshots for guidance on this.

Screenshot 2015-05-21 10.13.38.png

Screenshot 2015-05-21 10.14.08.png

1 Reply