Search code examples
sitecoresitecore8sitecore-commerce-servermvc-storefront

Sitecore > Disable html caching of a rendering


I am trying to upgrade the old project(based on storefront for Sitecore 8.0) to version Sitecore 8.1(latest one at the moment). During this process I faced with a problem when I see the same products for all categories. So, for example, I select a category first time and see correct products. After that I choose any other category, but still see the same products(from the first category). These data are returned by ProductList rendering(a controller rendering) and it is not run after the first call anymore(tried to reach corresponding action in a CatalogController in debug mode). If we clear all caches(..sitecore/admin/cache.aspx) - then it works again, but only first time.

I understand that I can't disable caching for the whole site, I need to do it for this generic page(with "*" in item name) where the commerce data are shown - so for all categories and product pages. I checked this rendering in design mode and can see that all checkboxes related to cache are unchecked at the moment. Don't know what I have missed.

Thank you in advance for the help.


Solution

  • The caching settings you've disabled are located in the presentation details on the control level:

    Presentation-level caching

    Additionally, you should ensure that caching is disabled on your sublayout (or rendering) definition (under /sitecore/Layout/Sublayouts):

    Sublayout definition caching