Examples

We recommend that to configure some caching for the search service that fetches all the available aggregations/facets values displayed on the product search and category pages. These values typically only change when a new attribute is for example, added to products, so the duration for this cache entry can be “large” if the set of product attributes does not change often. While this is project-specific, Adobe recommends values of a few minutes in project development phases and a few hours on stable production systems.

This is typically configured with the following cache entry:

com.adobe.cq.commerce.core.search.services.SearchFilterService:true:10:3600

Another example scenario where the GraphQl caching feature is recommended to be used is the navigation component because it sends the same GraphQL query on all pages. In this case, the cache entry would be typically set to:

venia/components/structure/navigation:true:10:600

When considering the Venia Reference store is used. Note the use of the component proxy name venia/components/structure/navigation, and not the name of the CIF navigation component (core/cif/components/structure/navigation/v1/navigation).

Caching for other components should be defined on a project basis, usually in coordination with caching configured at the Dispatcher level. Remember that there is not any active invalidation of these caches, so caching duration should be carefully set. There is not any “one size fits all” values that would match all possible projects and use cases. Make sure that you define a caching strategy at the project level that best matches the requirements of your project.