Clearing Cache
Clearing of cachesSitecores caches are cleared differently depending on your environment. A clearing of the cache can be brutal to the performance of your site until it is rebuilt.
The different caches are cleared like this:
The important part to notice here is that publishing can make quite a big impact on performance; especially if you are running in a staged environment; so you should consider your publishing strategy carefully. My experiences is that you often get the best result by using scheduled publish.
The different caches are cleared like this:
- The HTML cache: The HTML is always cleared on publish. So whenever you publish even a single item the complete cache is cleared. This is due to the fact, that parts of the HTML can be built from multiple items, so the cache has no way of knowing if the item being published has influence on the presentation.
- The Item cache: The item cache is updated incrementally in an atomized way, so if an item is updated during a publish it is updated in the item cache as well. If you publish an item which might influence other items, these items are cleared as well. For example if you publish standard values or a template, that clears more than a single item.
There is currently a bug in Sitecore 6.1.0.090630, which clears the item cache completely, if you publish a single item.
Further the cache is completely cleared by default if you use the staging module. - The data cache: Also the data cache is incrementally updated, when changes take effect after a publish. The cache is completely cleared by default if you use the staging module. It is rebuild incrementally when the items are requested again.
- The prefetch cache: Is cleared in the same way as the data cache, but the items specified in the config files are prefetched from the database.
The important part to notice here is that publishing can make quite a big impact on performance; especially if you are running in a staged environment; so you should consider your publishing strategy carefully. My experiences is that you often get the best result by using scheduled publish.