Home
3.3 Invalidation best practices and techniques
The best practice is to invalidate as little as possible! There is no value in discarding a cache entry that is still valid just because a time-out has been reached. You should adopt an attitude that it is best if you only invalidate when you absolutely have to.
Define invalidation rules to automate the invalidation of cache entries. Without invalidation rules, the whole cache is invalidated when content changes. Everything will be removed from the cache, not just the changed pages. Invalidation of the whole cache is not recommended and you should avoid it whenever possible. It may be common for the business user to change the campaigns that they are running, and once that has been done, they will expect the system to change immediately. Establish a schedule for making changes to Web pages with the result that multiple changes are made at one time and, if some of the same pages are hit, the amount of cache invalidation required is smaller.
Be very careful with operations that invalidate the whole cache. In a production environment, accidently invalidating an entire cache may prove disastrous, so consider removing that Clear Cache button from your production cache monitor application. There are many sites that follow this policy.
It is important that you thoroughly check and test changes that require a large part of the cache to be invalidated before you push the changes into production. You don't want to incur the hit of rebuilding a large part of the cache during peak production times.