Expand my Community achievements bar.

SOLVED

Caching concept in AEM CIF framework

Avatar

Level 8

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@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/adminis...

View solution in original post

3 Replies

Avatar

Level 5

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

Avatar

Correct answer by
Community Advisor

@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/adminis...

Avatar

Level 8

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

 

Regards

Mahesh