Caching concept in AEM CIF framework | Community
Skip to main content
Level 7
August 1, 2024
Solved

Caching concept in AEM CIF framework

  • August 1, 2024
  • 2 replies
  • 810 views

Hello Team,

 

I am exploring CIF components. Wanted to know, is any caching feature is implemented here? Or everytime, to fetch the product list or to fetch any item list, only GraphQL is used to fetch the details from Adobe Commerce?

 

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by AMANATH_ULLAH

@mahesh_gunaje 

For CIF components, caching is configured on a component basis, so it is possible to control if (and how long) GraphQL requests/responses are being cached for each component. It is also possible to define the caching behavior for OSGi services using the GraphQL client.

You can use com.adobe.cq.commerce.graphql.client.impl.GraphqlClientImpl configuration to define the caching on component basis
ex: venia/components/structure/navigation:true:10:600

Please refer below link 

https://experienceleague.adobe.com/en/docs/experience-manager-65/content/commerce/storefront/administering/caching

2 replies

Hemalatha
Level 4
August 1, 2024

Hi @mahesh_gunaje ,

 

For caching the GraphQL Response, you can either try to cache the repsonse in Dispatcher or Use a Java Based Object cache like EH Cache and setup the proper cache invalidation configuration for effective caching mechanism.

 

Regards,
Hemalatha C

AMANATH_ULLAH
Community Advisor
AMANATH_ULLAHCommunity AdvisorAccepted solution
Community Advisor
August 1, 2024

@mahesh_gunaje 

For CIF components, caching is configured on a component basis, so it is possible to control if (and how long) GraphQL requests/responses are being cached for each component. It is also possible to define the caching behavior for OSGi services using the GraphQL client.

You can use com.adobe.cq.commerce.graphql.client.impl.GraphqlClientImpl configuration to define the caching on component basis
ex: venia/components/structure/navigation:true:10:600

Please refer below link 

https://experienceleague.adobe.com/en/docs/experience-manager-65/content/commerce/storefront/administering/caching

Amanath Ullah
Level 7
August 1, 2024

Thanks @amanath_ullah for the insights. Now, I am getting the basic concepts of CIF.

 

Regards

Mahesh