There are Many ways to configure Caching in Sitecore.  Here is the four major caching concepts in Sitecore.

  1. HTML Caching
  2. Item Cache
  3. Data Cache
  4. Prefetch Cache



We can configure caching settings in separate config file under app_config or directly add to web.config (Remember, there is only one config file for site at run-time and all config files will be merged)

Add below configurations in your .config file if required!








To clear your install cache


1) HTML Cache

It caches actual HTML output generated from rendering and sublayout.
It can be configured from caching section of rendering controls.

HTML caching
Each website can be configured to enable or disable HTML cache along with allowed HTML cache size in web.config file under <sites> section.
<site name = “website” virtualFolder=”/” physicalFolder=”/” rootPath=”/sitecore/content ” startItem=”/Home” database=”web” domain=”extranet” cacheHtml=”true” htmlCacheSize=”10MB” enablePreview=”true” enableWebEdit=”true” enableDebugger=”true” disableClientData=”false” />
2) Item Cache
Sitecore items are cached under this cache layer. This cache contains objects of the Sitecore class Sitecore.Data.Items.Item, which are the one you use in your code most of the time.
Whenever any sitecore item is requested, it will be served from item cache and if it is not there then it will be served from data cache (next layer of cache) and will populate cache in item cache layer. So that whenever next request for same item is made, it will be directly served from item cache.
3) Data Cache
Data cache contains items of the Sitecore class ItemInformation. Whenever any request is made, data is pulled from data cache. But if it is not present there it will be pulled from prefetch cache and then will be put into data cache. So that whenever next request for same item is made, it will be directly served from data cache.
Data cache can be configured in web.config file under Caching.DefaultDataCacheSize setting:
<setting name = “Caching.DefaultDataCacheSize” value=”10MB” />

4) Prefetch Cache
There is prefetch cache for each database. The cache contains items of Sitecore class PrefetchData which is same like data pulled from database. Prefetch cache load the cache at Sitecore start up as per specified in App_Config/Prefetch folder.

Note: HTML caching can causes serious issues if you use rendering control repeatedly on same page (one component can be rendered multiple times)

Good read:

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Fake DB

How to do unit testing for media items in Sitecore + xUnit testing : Fake DB

Unit testing in Sitecore is a tricky one since you need create an items in Fake dB. I didn’t find much information about Media items unit testing and below piece of code may help you! Read more…


how to enable full rich text editor in sitecore

Add below paths in datasource location /sitecore/system/Settings/Html Editor Profiles/Rich Text Default /sitecore/system/Settings/Html Editor Profiles/Rich Text Full /sitecore/system/Settings/Html Editor Profiles/Rich Text IDE /sitecore/system/Settings/Html Editor Profiles/Rich Text Medium


Sitecore 8 Experience Editor: A serious error has occurred please contact the administrator

In Sitecore version 8.0 rev. 150621 I am experiencing issue when clicking on Experience Editor or Preview button in the Publish tab. The experience editor opens with the “A serious error has occurred please contact Read more…