Is it possible to implement HTML caching for Coveo Hive components
, similar to how we apply caching to Sitecore components using parameters like 'Vary by (user, query string, etc.
)'?
Our goal is to reduce the number of queries to Coveo.
The Coveo Hive components have been designed with HTML caching in mind and most of the components are "cached by data source", which should be enough in most cases. The rendered HTML depends solely on the data source parameter values, i.e. for a given set of parameters the HTML will always be the same regardless of the current visitor or the viewing page.
Note that the Context component is an exception and can't be cached as its purpose is to render all the non-cacheable information to make the HTML caching work for other components. Once the page is rendered, all the cached components can access the context on the client-side such as the current item, visitor details etc. and do their job as expected.