We have several websites running on AEM 6.5 (On-Premise), including both traditional template-based and headless implementations. For the headless sites, we've implemented a custom caching layer to cache persistent query results as per specific business requirements. We also have Dispatcher and CDN level caching which also caches persistent query result.
What’s the recommended approach to invalidate or clear this custom cache when Content Fragments are published?
Solved! Go to Solution.
Views
Replies
Total Likes
You need to implement event based cache invalidation, you can leverage Adobe IO to listen publish events from AEM and using Adobe IO runtime you can write some script to invalidate cache at cloud database.
I am not sure if you can detect which persistent query are caching a particular Content Fragment.
You can leverage the statefile and invalidate all the dispatcher cache for persistent query with each publish/unpublish.
The CDN cache can be flushed by listening publish/unpublish event and make API calls to explicit CDN cache invalidation.
Thanks @arunpatidar. Actually it's a custom cache implemented above dispatcher and CDN. Dispatcher and CDN cache is already invalidating after content publishing. Curious if this custom cache should also be flushed by listening publish/unpublish event?
Views
Replies
Total Likes
What is the custom cache? Is it SSG hosted somewhere on the cloud ?
Yes, cache stored in the cloud database used to optimize the content retrieval. Now we are looking for recommended way to invalidate this cache.
Views
Replies
Total Likes
You need to implement event based cache invalidation, you can leverage Adobe IO to listen publish events from AEM and using Adobe IO runtime you can write some script to invalidate cache at cloud database.
@Mukesh_Kumar_Co Just checking in — were you able to resolve your issue? We’d love to hear how things worked out. If the suggestions above helped, marking a response as correct can guide others with similar questions. And if you found another solution, feel free to share it — your insights could really benefit the community. Thanks again for being part of the conversation!
Views
Replies
Total Likes
Views
Likes
Replies