Caution While cache invalidation is powerful, avoid it when possible.If you fail to invalidate something, outdated caches will be served for a potentially long time.Tip If you want to use cache invalidation, have a look at the FOSHttp Cache Bundle. Refreshing means that the caching proxy is instructed to discard its local cache and fetch the content again.ATG includes a JMS-based system for explicitly invalidating caches in a SQL repository.Sometimes, however, you need that extra performance you can get when explicitly invalidating.For invalidation, your application needs to detect when content changes and tell the cache to remove the URLs which contain that data from its cache.However, the configuration is made on the authoring environment and then transferred by activating the agent: After configuring, when you activate a page from author to publish, this agent initiates a standard replication.
A replication agent on the AEM author instance sends a cache invalidation request to Dispatcher when a page is published.
Eclipse Link provides a shared (L2) object cache that can reduce database access for objects and their relationships.
This cache is enabled by default which is normally not a problem, unless the contents of the database are modified directly by other applications, or by the same application on other servers in a clustered environment. If the contents of the database are modified, then a mechanism is needed to ensure that the contents of the cache are synchronized with the database.
Having done some automated browser testing recently, it was easy to whip up a couple of tests for these requirements.
I’ve moved all of the caching-related testing into one page; while it uses XMLHttp Request, these results should be valid for most any implementation, as the same cache as the normal browser be used. Safari seems OK for these purposes (even unknown methods), while Firefox gloriously fails all of the invalidation tests.