Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

Clearing Cache from Dispatcher and CDN

Avatar

Level 3

Hi All ,

Could you please share the details for below questions 
1. What are the steps to clear the cache from the Dispatcher and the default Fastly CDN provided with AEM as a Cloud Service?

2.How can we clear the cache from the Dispatcher and a different CDN such as Akamai? Specifically, I need to understand the process for invalidating or purging cache entries on these alternative CDNs.

Thanks

 

 

1 Accepted Solution

Avatar

Correct answer by
Level 5

@KannanCh2 

To clear dispatcher cache:
1. by Replicating the page
2. by using acs commons https://adobe-consulting-services.github.io/acs-aem-commons/features/dispatcher-ttl/

 

To clear Default Fastly CDN cache
This can be cleared using purge call by using the x-aem-purge-key provided by Adobe for each environment

 

For other CDN's
We have to use the API's/interface provided by them for purging cache

View solution in original post

6 Replies

Avatar

Employee Advisor

My personal opinion on that, is that if you need to invalidate CDN and dispatcher caches on a regular basis, you are doing something wrong, or caching was an afterthought in your whole content strategy. Normally the default AEM dispatcher invalidation plus a TTL-based invalidation should be sufficient in 99% of all cases.

(I know, that this can be an unpopular opinion, and you might have the 1% case, where this is simply not working at all, even when relaxing a number of requirements. Would love to understand more about these cases then.)

 

 

 

 

 

Avatar

Level 9

Hi @KannanCh2 ,

1. To clear the cache from the Dispatcher and the default Fastly CDN provided with AEM as a Cloud Service, you can follow these steps:

- Clearing the Dispatcher cache:
1. Connect to the server where the Dispatcher is installed.
2. Navigate to the Dispatcher cache directory.
3. Delete the cache files or directories that you want to clear.

- Clearing the Fastly CDN cache:
1. Log in to the Fastly web interface.
2. Navigate to the appropriate service and version.
3. Click on the "Purge Everything" button to clear the entire cache.
4. Alternatively, you can use Fastly's API to purge specific URLs or content.

2. To clear the cache from the Dispatcher and a different CDN such as Akamai, you can follow these steps:

- Clearing the Dispatcher cache:
1. Connect to the server where the Dispatcher is installed.
2. Navigate to the Dispatcher cache directory.
3. Delete the cache files or directories that you want to clear.

- Clearing the Akamai CDN cache:
1. Log in to the Akamai Control Center.
2. Navigate to the appropriate property and version.
3. Click on the "Purge" button to purge specific URLs or content.
4. Alternatively, you can use Akamai's API to purge specific URLs or content.

Note that the specific steps and configurations may vary depending on your AEM setup and the CDN provider being used. It's always a good practice to consult with your IT team or CDN provider to ensure that the appropriate configurations are in place and to follow their recommended procedures for clearing the cache.

Avatar

Correct answer by
Level 5

@KannanCh2 

To clear dispatcher cache:
1. by Replicating the page
2. by using acs commons https://adobe-consulting-services.github.io/acs-aem-commons/features/dispatcher-ttl/

 

To clear Default Fastly CDN cache
This can be cleared using purge call by using the x-aem-purge-key provided by Adobe for each environment

 

For other CDN's
We have to use the API's/interface provided by them for purging cache

Avatar

Community Advisor

@KannanCh2 

 

  • For purging Dispatcher Cache on demand, you would need to use Sling Content Distribution
  • For Adobe managed CDN, you can raise an Adobe ticket, they would share a curl command for purging resources. Flush CDN cache flush can only be done by Adobe
  • For custom CDN, you would need to visit their specific documentation. They might provide UI/API to achieve the same.

Aanchal Sikka

Avatar

Administrator

@KannanCh2 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni