0

enter image description here

I have added the custom cache option (vary by URL) in the template

/sitecore/templates/System/Layout/Sections/Caching/Caching. 

To add the above option I followed the blog post:

http://www.leonardocunha.net/2019/10/15/how-to-cache-sitecore-wildcard-items-and-multiple-renderings/

But, the Vary By Url option is still not visible on the Rendering. What am I missing here? Do I need to do any other config setting etc. for the same?

1 Answer 1

1

You will not get the new field in the rendering parameter section, the value you are adding will only visible on rendering itself. See the caching section on the rending item under the layout node.

enter image description here

If you will see the Standard Rendering Parameters- /sitecore/templates/System/Layout/Rendering Parameters/Standard Rendering Parameters, Caching is a custom type field in it which mean it is not managed by the template you are updating. This custom type field is only updating the rendering field of the item as below -

 s:cac="1" s:vbd="1" s:vbl="1" s:vbp="1" s:vbqs="1" 

enter image description here

The Caching field is using - Sitecore.Shell.Applications.Layouts.DeviceEditor.CachingField class from Sitecore.Client dll. If you want to manage the caching on Item level then you need to create your custom caching field.

2
  • Thanks Mahendra, this is very helpful and makes its clearer. We will need to create a custom field for the item level cache. Commented Dec 19, 2019 at 13:05
  • Just a heads up for anyone else, It won't be just a custom caching field, you will also need to extend RenderingEditorForm, as it's responsible for retrieving values from actual rendering and saving.
    – Ed T.
    Commented May 17, 2021 at 10:33

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.