I am already using Sitecore cache
in SXA
. I am using it on site level. My question is if we have Sitecore cache
on site level, do we need to add it on rendering level in Sitecore SXA
?
I am using the below link for Sitecore cache :-
I am already using Sitecore cache
in SXA
. I am using it on site level. My question is if we have Sitecore cache
on site level, do we need to add it on rendering level in Sitecore SXA
?
I am using the below link for Sitecore cache :-
This is as per your requirement, if you want caching globally then you can apply cache on rendering level but if you want caching to be applied on your site level only then you can have caching on site level only.
For ex - If you have 2 sites - Site A and Site B, so let's suppose you want header rendering to be cached Site level only then in this case apply caching on Site level using following -
sitecore/<tenant>/<site>/Presentation/Cache Settings
and on the Home tab, click Component Cache Settings.Enter a name for the setting and click OK.
In the Select Items dialog box, navigate to Layout/Renderings/Feature/Experience Accelerator, click the renderings for which you want this setting to apply, and use the arrow to move them to the Selected field.
And you want CTA rendering to be cached globally then in this case apply caching on globally using following - To set caching options for a rendering globally:
Navigate to sitecore/Layout/Renderings/Feature/Experience Accelerator
and click the relevant rendering.
In the Caching section
, select the caching options for the navigation rendering to help improve website performance:
This is already mentioned in the links that you shared If you set the caching options
for a rendering
on a site level
, this overrides
the global caching settings
in the rendering definition items
. So the answer is it will override it on the rendering.
Also, Gaurav mentioned in his answer, that to do that on the site level, you need to create a component cache setting
and here you will provide the name of the renderings
to cache. So it will automatically get applied to the component rather than go onto the particular one.
Hope this answer your question.