Quantcast
Channel: Troubleshooting – Sitecore basics!
Viewing all articles
Browse latest Browse all 5

Cache Tuner V2

$
0
0

Hello Everyone, Sorry for being away for a while. I got busy due to personal and professional commitments. But I’m back with lot of new learnings which I’ve planned to share with you.

Cache Tuner is one of my favorite modules [Widely accepted and appreciated by Sitecore community – Thanks for your appreciation, It motivates me to work on weekend to update this module instead of watching India-Australia match 😉], and thought to update it to handle few of the following use cases:

  1. Sitecore 9.1 Compatible : As you know, Sitecore made big architectural changes in Version 8.2 to make Sitecore caching much more better and extensible. But it broke few tools like CacheTuner and so others. In December, updated Cache Tuner to use new API : https://sitecorebasics.wordpress.com/2018/12/25/sitecore-9-compatible-cache-tuner/ While I was working on Cache Tuner V2, Thought to validate it on my Sitecore 9.1 Instance to make sure it works — And it indeed works! So, I have done all my validation on Sitecore 9.1. So, you can try with your new 9.1 instance with confidence. But please remember – If you find something new, Please report it on github or create PR with fix 🙂
  2. Drill down cache and clear specific cache : Since childhood, I’ve been always curious to know – How stuff works? (I’m sure for most of you as well, that’s why you are in this field). Same has been true for Sitecore Caching as well. As you know Sitecore caching uses same structure like HashTable. Where you have Key – Value pair. Along with that, Sitecore also has nested Hashtable. Which means one Key’s Value will also have another hashtable with Key – Value. At times when you are troubleshooting caching challenges, You must have thought of this. Is this caching issue or not? And to do that, Usually, what you do is, Use Sitecore Admin cache page to clear all cache and if it fixes the issue. Then it’s caching issue else it is something else. Sounds similar? You can do this on lower environment. But what if you must do same thing on production environment? During that you must be thinking. What If:
    1. I can see what’s inside each cache entry e.g. Click on YOURSITE[HTML] and see whether component which you are trying to troubleshoot exists or not in that list. I can clear specific Cache instead of FULL Cache e.g. You can just clear YOURSITE[HTML] cache and see whether it fixes your issues or not, Without affecting other caches. If you got excited and say — I know there’s module in marketplace which does exactly same thing – Then I would say cool down, as I also had same excitement, with this module : https://marketplace.sitecore.net/en/Modules/S/Sitecore_Cache_Admin.aspx Which I used a lot, And would like to Thanks this Module Admin. As this feature of Cache Tuner V2 is inspired from this module. But this module is not updated to support new Caching API Changes. Now, All above things are possible with CacheTunerV2 — I believe, This feature will be super helpful to community. And I’m excited to know your feedback on this.
  3. Clear all cache : Instead of relying on Cache Admin page, you can do it using CacheTuner page [Note : Please make sure you delete your cache tuner page, as soon as you are done with your Caching Tuning and troubleshooting. As CacheTuner page is not yet secure page]

Sounds exciting? And curios to know more about this. Let’s do it:

Screenshots:

Clear all Button
If Cache key has value, Then it will be clickable. If you would like to drill down and see what’s inside — please click desired cache key. Which will open Cache Detail page in new window with details of clicked cache key.
Cache detail page for website[html] cache key looks like this. #1 – Shows total number of cache entries stored in clicked cache, #2 – Cache details – In this example it is showing you how HTML Cache is getting stored for each component. #3 – Using “Clear Me!” button you can click particular cache. In this example website[html]

How to use it?

  1. Download from Cache Tuner V2 release : https://github.com/klpatil/CacheTuner/tree/CacheTunerV2 (Take a note of CacheTunerV2 branch and you can refer Release section : https://github.com/klpatil/CacheTuner/releases/tag/CTV2.0)
  2. Copy it under your desired folder. I recommend to have everything under CTV2 folder e.g. Webroot/MyTools/CTV2/* (All Cache Tuner v2 files in same folder)
  3. Access Cache Tuner V2 as per your copied folder e.g. https://<mysite>/mytools/ctv2/cachetuner.aspx
  4. That’s it – Fix you Caching issue and go home, your loved ones are waiting for you!

Hope you found this useful, There are few useful features in my roadmap. Thought to share with you. In case, you want to contribute to module.

Future release:

  1. Add Authorization
  2. Drill down cache details for all types, as of now it only supports few caching types only. And it should handle most of the use cases.
  3. Clear specific cache entry – As of now you can’t clear specific cache entry. You can clear specific cache container. e.g Instead of clearing website[html] would like to have a feature to clear cache entry which is inside website[html]
  4. Anything I missed? I’m all ears!

Old links:

https://sitecorebasics.wordpress.com/2011/04/27/cache-tuner-user-guide/

Thank you so much for reading!


Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles





Latest Images