Reputation: 952
I want to find out if there is any difference between CQ dispatcher cache flush (from publish instance) and dispatcher cache invalidation?
Any help please?
Upvotes: 1
Views: 2331
Reputation: 3444
Dispatcher is a reverse proxy server that can cache data from HTTP source. In case of AEM, it's normally the publisher or the author. Although, in theory, it can even be any resource provider. This backend is called a "Renderer".
Cache invalidation is a HTTP operation triggered by the publisher to mark the cache of a resource as invalid on the dispatcher. This operation will only delete the resource(s) but it will not refresh the resource.
Flush is the workflow associated to publishing of the page and invalidating the cache from publisher/author instance when a new content/resource is published. It is very common scenarion to invalidate the cache during publish so that new content is available for your site.
There are scenarios, where you want to refresh the cache without re-publishing the content. For example, after a release you might want to regenerate all the pages from the publisher as the changes are not editorial changes and hence none of the authors will be willing to publish the content. In this case, you will simply invaidate the cache without using the publish workflow. Although, in practice, it's generally easier to zap the cache directory on dispatcher rather than flushing all the pages but that's a preference. This is where the separation of flush and invalidation really matters and apart from that nothing is really different as the end result is almost the same.
Upvotes: 2
Reputation: 576
There are two things, through which cache is modified- 1. Content update 2. Auto-Invalidation
Content update comes into picture when any AEM page is modified.
Auto invalidation is used when there are many automatically generated pages, so the dispatcher flush agent checks for the latest version of files, and marks the files out of date accordingly, by modifying the stat file.
Upvotes: 0
Reputation: 260
CQ basically calls the "Dispatcher Flush Rule Service" from the OSGI, which calls the Replication action type as "Invalidate Catch". So this means To flush the catch CQ replication agents call the action which is called as invalidate catch. The term is little confusing but its just service and action combination in OSGI.
Upvotes: 0
Reputation: 9402
This Adobe article seems to use "flush" and "invalidate" interchangeably.
It says:
Manually Invalidating the Dispatcher Cache
To invalidate (or flush) the Dispatcher cache without activating a page, you can issue an HTTP request to the dispatcher. For example, you can create a CQ application that enables administrators or other applications to flush the cache.
The HTTP request causes Dispatcher to delete specific files from the cache. Optionally, the Dispatcher then refreshes the cache with a new copy.
It also talks about configuring a "Dispatcher Flush" agent, and the config for that agent invoked an HTTP request that has "invalidate.cache" in the URL.
Upvotes: 0