Tip View html cache content

Created: 12 Oct 2022, last update: 9 Nov 2024

Tip: View Sitecore HTML cache content

A while ago I modified the Sitecore Caching Manager from Mark Stiles, for Sitecore 10+, recently I updated it with the functionality to also view the HTML cache content, and tested it on Sitecore XM Cloud preview.

Sitecore SXA and HTML caching.
With a traditional JSS or MVC website with renderings at least the caching key tells what inside, with the rendering variant from SXA you see a lot of cache key that start with:

controller::Sitecore.XA.Foundation.RenderingVariants.Controllers.VariantsController,Sitecore.XA.Foundation.RenderingVariants
or if you have a custom one for example:
controller::SXA.Foundation.Variants.Controllers.VariantsController,SXA.Foundation.Variant

The content can be anything, if you are looking for something you can of course also use the search function. But how handy would it be if you could just see the content simplicity, you can now!

With the Sitecore Caching Manager version from here: https://github.com/jbluemink/SitecoreCachingManager  it is not fully polished yet and 100% working for XM cloud for example not yet ready for merge request but at least the HTML cache functionality is already working fine.

There are 2 options to view the HTML cache content:

Get Cache Content - What the content shows raw the browser then shows the content with possibly also images, assuming that your components provide a valid piece of html that does not break the page.

Get Cache Content -  Which displays the content HTML encode so that you see the HTML code.

https://github.com/jbluemink/SitecoreCachingManager