I am using html cache on rendering level with "vary by data", and it is working fine for english version. But i am not sure whether it will work on different language version or not as, it is using the same data source but with different language version.


  • 2
    So why do you ask here instead of just testing? :)
    – Marek Musielak
    Apr 13, 2022 at 8:55
  • LoL, @MarekMusielak i don't have any multilingual page right now, so better to ask before implementation if you are not sure. Do you have any suggestions?
    – Gautam
    Apr 13, 2022 at 9:16

1 Answer 1


Sitecore internally uses the current language in the cache key so the above approach will work fine for different language versions as well. It treats every sublayout or rendering as a different version in each language.

The layout engine implements caching by retrieving the output that is previously generated by a component based on the language version, under similar conditions, instead of invoking the component again. By default, the layout engine executes each presentation component for each HTTP request, without any output caching. So it will work fine in every language.

  • Thanks Mahendra. The cache key generated for vary by data is " : controller::[Controller]#[Controller Action]#lang:[Language Culture Code]#data:[Path of the Datasource Item]" , so key is different for each language. it will work
    – Gautam
    Apr 13, 2022 at 9:51

Your Answer

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

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