Try our conversational search powered by Generative AI!

CMS 12-Episerver Content Delivery API Caching Issue

Vote:
 

Hi Team,

  I have devloped a spa (single page application) in the react technology and one cms application in which I have enabled the content delivery api. Our spa application consuming the content delivery api.   

  When I am upadating and publishing content in the cms application some times updated content immediately not reflecting in the spa applciation.

 I have gone through https://mmols.io/add-http-caching-to-the-episerver-content-delivery-api link . But unfortunately not able to implment in cms 12.

I am not able to find below reference in cms 12

EPiServer.ContentApi.Controllers.ContentApiController
EPiServer.ContentApi.Search.Controllers.ContentApiSearchController
EPiServer.ContentApi.Controllers.SiteDefinitionApiController

Thanks

Binay

#288750
Oct 06, 2022 10:57
Vote:
 

Binay,

You said when you publish content, CDApi is delayed in returning the updated content. Are you looking to remove this delay?

#288751
Oct 06, 2022 12:14
Vote:
 

Hi Binay,

I think the first thing to do would be to work out where the caching is occurring. Often SPAs will store API responses to avoid making the same request twice so it may be that the content is getting cached in your SPA. I'd say the first thing to try would be to hit the API directly using postman or something like that to request the content for one of the pages where you're seeing the issue. Publish a change in the CMS and hit the API again to see if your change is reflected in the API response.

#288752
Oct 06, 2022 12:17
Vote:
 

Surjit Bharath Yes, I am looking to remove this delay.

#288763
Oct 06, 2022 14:46
Vote:
 

I have found the solution and my issue got resolved . Below link is helpful for me.

https://www.gulla.net/en/blog/quick-and-dirty-output-cache-in-optimizely-cms12/

#289162
Oct 13, 2022 14:33
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.