Caching Strategy for AEM as a Headless CMSby Chitra Madan
Overview
When using Adobe Experience Manager (AEM) as a Headless CMS, ensuring an efficient caching strategy is critical for delivering high performance and scalability. A robust caching mechanism helps reduce latency, offload server requests, and ensure that the end-user experience is seamless. This blog explores key caching strategies tailored for AEM in a headless architecture.
Great article, @ChitraMadan ! In large-scale implementations, do you recommend using a layered caching approach (like combining CDN with AEM’s native caching) to optimize performance, or would a simpler approach suffice?
Yes, I would highly recommend layered caching approach, having CDN caching on top of AEM native's caching will definitely help. Consider a scenario, where for some reason your dispatcher goes down or is not able to scale, having caching in CDN in these scenarios, will help mitigate the impact on your website. As a standard practice, we are anyways using CDN on top of Dispatcher, so why not even use it for caching, if it helps, without adding cost.
@ChitraMadan Really helpful post! Very insightful on caching for headless AEM. In your experience, do you usually rely more on dispatcher caching, CDN-level caching, or a combination when serving high-traffic APIs?
@kautuk_sahni - We rely on multiple layers of caching in order to optimise response time. In our case, Headless APIs are being served via a Microservice layer, hence we rely on Redis cache, then CDN cache, followed by Dispatcher cache, keeping the invalidation TTL same on Redis and CDN layers, example for frequently changed content, we have a TTL of 1hr in CDN and Redis and for others - 24 hrs. Dispatcher cache gets invalidated when we publish the content fragments linked to the particular Headless Endpoint.