8

I have a problem with my HTML cache always being empty when I look at the cache report screens in Sitecore I have done the following:

  • Enabled Cacheable and Vary By Data on each rendering in Sitecore (view renderings and controller renderings)
  • Ensured that under each site (this is a multisite solution) I've set cacheHtml="true" htmlCacheSize="25MB"
  • Set Caching.DisableCacheSizeLimits to true

Am I missing something as when I hit this page: /sitecore/admin/cache.aspx I see nothing in my HTML cache for any sites. Also /sitecore/admin/stats.aspx shows 0 in the from cache column for everything.

11
  • Is the cacheHtml attribute of your <site> element set to true? Oct 4, 2016 at 12:48
  • Which version of Sitecore are you using?
    – jammykam
    Oct 4, 2016 at 12:55
  • I'm using 8.1 update 2. Oct 4, 2016 at 14:04
  • I'd mentioned I have cacheHtml="true" in all my sites above but it looks like you and Dmytro missed that. Oct 4, 2016 at 14:05
  • Where did you enable caching? Directly on the rendering item under /sitecore/content/layout? Or on the renderings in Presentation Details? Oct 4, 2016 at 14:33

2 Answers 2

4

To make HTML cache work:

  • Make sure that the cacheHtml attribute of your /configuration/sitecore/sites/site is set to true.
  • If you dynamically bind a rendering to a placeholder using layout details, cache settings explicitly defined in layout details will override cache settings defined in the rendering definition item. Make sure that cache settings are either set correctly in the layout details, or that they aren't set at all.
  • If you use Sitecore Debugger, make sure that rendering information is turned off by unchecking the "Information" checkbox in the "Rendering" group in Sitecore Debugger.
2
  • The debugger is a great tool to help see what is going on.
    – sestocker
    Oct 4, 2016 at 13:51
  • I've tried all of these things but I'm still not seeing anything being cached. I wonder if Glass is doing something which is affecting this. Oct 5, 2016 at 22:04
0

My html cache eventually started showing data. It did reset to zero every once and a while. But going into debug (in the tracing section) mode I was able to confirm my renderings were pulling from html cache. The trick was to uncheck the boxes for rendering borders and information.

There's a sample of what cached renderings look like in the tracing section link here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.