AEM 6.5 | Custom Cache Invalidation Strategy for Headless Content | Community
Skip to main content
Mukesh_Kumar_Co
Level 3
July 22, 2025
Solved

AEM 6.5 | Custom Cache Invalidation Strategy for Headless Content

  • July 22, 2025
  • 2 replies
  • 536 views

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?

Best answer by arunpatidar

Yes, cache stored in the cloud database used to optimize the content retrieval. Now we are looking for recommended way to invalidate this cache.


Hi @mukesh_kumar_co 

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.

2 replies

arunpatidar
Community Advisor
Community Advisor
July 23, 2025

Hi @mukesh_kumar_co 

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.

Arun Patidar
Mukesh_Kumar_Co
Level 3
July 23, 2025

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?

arunpatidar
Community Advisor
Community Advisor
July 23, 2025

Hi @mukesh_kumar_co 

What is the custom cache? Is it SSG hosted somewhere on the cloud ?

Arun Patidar
kautuk_sahni
Community Manager
Community Manager
August 4, 2025

@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!

Kautuk Sahni