How to Clear & Flush AEMaaCS Cache After Code Deployment

Flushing the cache in Adobe Experience Manager as a Cloud Service (AEMaaCS) after a code deployment is a critical step to ensure that users receive the most up-to-date content. Good new for you, AEMaaCS automates much of this process through its rolling deployment strategy, which involves coordinated steps to deploy code, update configurations, and invalidate the Dispatcher cache across all instances.


1. Rolling Deployment Process in AEMaaCS

During a production deployment, AEMaaCS follows a rolling deployment strategy to minimize downtime and ensure continuous availability. Here’s how it works:

  1. Deploy AEM Packages to Author:
    • The deployment begins by pushing the updated AEM packages to the author instance. This ensures that the author environment is updated first, preparing it for any content authoring that might be needed post-deployment.
  2. Detach Dispatcher1 from the Load Balancer:
    • The first Dispatcher (dispatcher1) is temporarily removed from the load balancer. This prevents it from serving any requests during the deployment, ensuring that users do not access potentially outdated or unstable content.
  3. Deploy AEM Packages to Publish1 and Dispatcher1:
    • With dispatcher1 detached, the deployment of AEM packages to the first publish instance (publish1) and the corresponding Dispatcher package to dispatcher1 occurs simultaneously.
    • After the deployment, the Dispatcher cache is flushed. This step is critical as it clears the old cache, ensuring that the updated content is served once the Dispatcher is brought back online.
  4. Reattach Dispatcher1 to the Load Balancer:
    • Once the deployment to publish1 and the cache flush on dispatcher1 are complete, dispatcher1 is added back to the load balancer. It can now serve requests with the updated content and configurations.
  5. Repeat for Dispatcher2:
    • The process is repeated for the second Dispatcher (dispatcher2). Dispatcher2 is detached from the load balancer, the deployment is made to publish2 and dispatcher2, the cache is flushed, and then dispatcher2 is reattached to the load balancer.
  6. Continue for All Instances:
    • This rolling deployment process continues until all publish and Dispatcher instances in the topology have been updated. By updating one Dispatcher at a time, AEMaaCS ensures that there is always at least one Dispatcher available to serve requests, thus maintaining high availability throughout the deployment.

2. Why Is This Process Important?

Flushing the Dispatcher cache after code deployment is essential for ensuring that users receive the latest content and that no outdated files are served. The rolling deployment strategy employed by AEMaaCS automates this process, making it seamless and reducing the risk of downtime or content inconsistencies.


3. Additional Considerations

While AEMaaCS automates much of the deployment and cache flushing process, it’s important to ensure that your Dispatcher configurations are optimized for this process. Properly configured .stat files and cache invalidation rules help to ensure that the cache is only flushed when necessary, preserving performance while ensuring content freshness.

For more detailed information on the rolling deployment process and how AEMaaCS handles cache invalidation, refer to the official Adobe Experience Manager documentation .

This step-by-step approach ensures a smooth transition during code deployments, keeping your AEM environment optimized and responsive.


Hello, I am an enthusiastic Adobe Community Advisor and a seasoned Lead AEM Developer. I am currently serving as an AEM Technical Lead at MNPDigital.ca, bringing over a decade of extensive web engineering experience and more than eight years of practical AEM experience to the table. My goal is to give back to the AEM Full Stack Development community by sharing my wealth of knowledge with others. You can connect with me on LinkedIn.

Leave a Reply

Your email address will not be published. Required fields are marked *


Back To Top
bacan4d
bacansport
bacan4d
bacan4d
bacansport
bacansport
xx1toto
bacansport
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
xx1toto
bacansport
xx1toto
bacan4d
xx1toto
xx1toto
bacan4d
linkbacan4d
bacan4d
bacan4d
bacansports
bacan4d
xx1toto
xx1toto
bacan4d
bacan4d