Thursday 22 June 2017

Sitecore Cache Manager Tool


Sitecore provides very powerful caching mechanism. Mainly there are three types of cache layers, Items cache, Data cache and Prefetch cache.

Other than above caches, there are many other different caches sitecore maintains in memory. And the number dramatically increases if you have multisite instances.

Read more about sitecore caches in detail: http://sitecoreblog.patelyogesh.in/2013/06/how-sitecore-caching-work.html

Caching issues on CD servers after publishing is common when you are dealing with horizontally scaled Sitecore environment and we were no exception. Recently, we started facing this issue frequently.

Meanwhile you are troubleshooting the caching issue as it might not be a task of a day or two - sometimes you may have to wait for weeks for it to reproduce and collect all relevant data - Cache Manager tool is must have tool for all Sitecore developers dealing with large instances.

Sitecore provides a nice caching tool, Cache.aspx,  in built. (you may find it at /sitecore/admin/cache.aspx) this tool is helpful when you are dealing with small instances of sitecore where your entire cache size is not more than 500 MB, because this tool has a button to clear ALL the caches on a single hit.


Imagine you have cache size more than 2GB and you cleared all caches on one click!!!! All the subsequent requests with go to database to get content, it may extremely slow down your instance. So basically, you may need a partial cache clearing tool which can clear only those cache entries which didn't got cleared upon content publish.

In that case, Cache Manager tool can help you, Mark Stiles has done amazing work to create such a tool and saved life of many Sitecore developers like me :)

Download it from here:https://marketplace.sitecore.net/Modules/C/Caching_Manager.aspx?sc_lang=en 

As of now this tool is compatible with CMS 6.4.1, CMS 6.5, CMS 6.6, CMS 7.0, CMS 7.1, CMS 7.2, CMS 7.5 and SXP 8.0

As sitecore has done a lot of changes in Cache API post SXP 8.1, this tool does not work in SXP 8.1 and SXP 8.2

I have made code changes to make it work in SXP 8.2, it may work in SXP 8.1 as well (though it is not tested in SXP 8.1)

You can download it from here. https://drive.google.com/file/d/0B1g8hUR0YDovOGhqcXE3ZmpmSk0/view?usp=sharing 


Happy cache clearing :)

No comments:

Post a Comment