Set SXA caching options
You can improve the load time of your web pages by setting the caching options for the renderings. The HTML cache minimizes the number of times Sitecore processes renderings. This is important, especially if you have renderings that iterate over a large amount of items.
To enable caching for your site, navigate to sitecore/content/<site collection>/<site>/settings/Site Grouping/<site>, and in the Flags section, select the Cache Html check box.
Set rendering definition caching options globally
In the rendering definition item, you can specify what action Sitecore takes to render the component. If you set the cache settings in the rendering definition item, these settings are applied to all sites, unless cache settings are specified otherwise.
To set caching options for a rendering globally:
-
Navigate to sitecore/Layout/Renderings/Feature/Headless Experience Accelerator and click the relevant rendering.
-
In the Caching section, select the caching options for the navigation rendering to help improve website performance:
-
Cacheable – select to enable HTML caching. If your rendering has only one view, this is the only check box that you must select.
-
Clear on Index Update – select to clear the HTML cache of renderings when the index is updated.
-
Vary By Data – select to cache a separate version of the HTML based on the data source of the rendering.
-
Vary By Device – select to cache copies of the output for each device that is used.
-
Vary By Login – select if the rendering is displayed differently for logged in users.
-
Vary By Parm – select to cache the output for each parameter accepted by the rendering. Used to distinguish different instances of the same rendering.
-
Vary By Query String – select to cache the output for each unique combination of query string parameters.
-
Vary By User – select if the rendering displays user-specific information.