Solved
Caching content fragments json coming from asset api
Hi All,
We are using content fragments in our components using asset api. We are directly calling the asset api URL from frontend to get the json for the content fragments. We are trying to cache this json coming from the asset api.
1. We are unable to cache this json in dispatcher as we were receiving pragma: no-cache and
Cache-Control: no-store, max-age=0 headers in the response.
We added a filter to override these headers. With the filter we are able to cache the json which had less data/content but for bigger json were still getting the pragma: no-cache headers. We are unable to figure out why is happening.
2. As an alternative we added a custom servlet to call the asset api instead of calling it directly.
We added a filter to override these headers. With the filter we are able to cache the json which had less data/content but for bigger json were still getting the pragma: no-cache headers. We are unable to figure out why is happening.
2. As an alternative we added a custom servlet to call the asset api instead of calling it directly.
We are able to cache the servlet response but the problem with this is the cache invalidation.
The cached json is not getting flushed when we publish the content fragments or publish the page.
Any suggestions/ input would be greatly appreciated!"
Thank you