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.

Dispatcher Caching

Caching AEM pages or fragments in the AEM Dispatcher is a best practice for any AEM project. Usually, it relies on invalidation techniques that ensure that any content changed in AEM is properly updated in the Dispatcher. This is a core feature of the AEM Dispatcher caching strategy.

In addition to pure AEM managed content CIF a page can typically display commerce data that is dynamically fetched from Adobe Commerce via GraphQL. While the page structure itself might never change, the commerce content might change, for example, if some product data ( such as name or price) changes in Adobe Commerce.

To make sure that CIF pages can be cached for a limited amount of time in the AEM Dispatcher, we hence recommend the use of Time Based Cache Invalidation (also known as TTL-based caching) when caching CIF pages in the AEM Dispatcher. This feature can be configured in AEM with using the extra ACS AEM Commons package.

With TTL-based caching, a developer typically defines one or multiple caching durations for selected AEM pages. This ensures that CIF pages are only cached in the AEM Dispatcher up to the configured duration and that the content will be frequently updated.

NOTE
While server-side data may be cached by the AEM Dispatcher, some CIF components like the product, productlist, and searchresults components typically always re-fetch product prices in a client-side browser request when the page is loaded. This ensures that crucial dynamic content is always fetched on page load.

Experience Manager


The True Cost of a Failed Implementation

Online | Session | General Audience

A failed implementation isn’t just an inconvenience — it costs real revenue. Poor execution and misaligned tools disrupt pipelines,...

Wed, Mar 19, 2:00 PM PDT (9:00 PM UTC)

Register

Elevate and Empower Teams with Agentic AI for Exceptional Experiences

Online | Strategy Keynote | General Audience

Elevate and empower your CX teams with AI that transforms creativity, personalization, and productivity. Discover how Adobe is...

Tue, Mar 18, 1:00 PM PDT (8:00 PM UTC)

Register

Connect with Experience League at Summit!

Get front-row access to top sessions, hands-on activities, and networking—wherever you are!

Learn more