AEMaaCS : Dispatcher/CDN cache | Community
Skip to main content
Level 4
July 28, 2022
Solved

AEMaaCS : Dispatcher/CDN cache

  • July 28, 2022
  • 3 replies
  • 4263 views

Hi,

 

Could you please calrify my below doubts.

1> Where can we configure caching rules for CDN?

2> In dispatcher we have /cache section within which we have /rule section to define which all are the files to be cached and /invalidate section to define which all are files to be considered for invalidating. so my question is , what happens to the files which are part of /rule section but not part of /invalidate section.

3>In our project all most all files are allowed to cache in /rule section but in /invalidate section only .html and mode.json is present . so how will clientlibs and dam assets gets invalidated ?

4> Should we cache assets are not ? what is the standard ?

5> What are must cache files in any aem sites.  

6> Do we still use dispatcher flush agents in publihs for invalidation of cache in AEMaaCS?

7> Do we need to add cache-control to response header with max-age as well to cache files in dispatcher ? /rule section is not enough ?

 

Thanks,

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Tushar_Gupta

1> Where can we configure caching rules for CDN? - 

<LocationMatch "^/content/.*\.(html)$">
     Header set Cache-Control "max-age=200"
     Header set Surrogate-Control "max-age=3600"
     Header set Age 0
</LocationMatch>

these TTL's will be respected by Dispatcher/CDN both

 

2> In dispatcher we have /cache section within which we have /rule section to define which all are the files to be cached and /invalidate section to define which all are files to be considered for invalidating. so my question is , what happens to the files which are part of /rule section but not part of /invalidate section.

they will not cache on dispatcher

https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/dispatcher-configuration.html?lang=en 

3>In our project all most all files are allowed to cache in /rule section but in /invalidate section only .html and mode.json is present . so how will clientlibs and dam assets gets invalidated ?

it should be on TTL basis.

 

4> Should we cache assets are not ? what is the standard ?

Yes.

5> What are must cache files in any aem sites.  

Assets and try to cache whatever you can.

6> Do we still use dispatcher flush agents in publihs for invalidation of cache in AEMaaCS?

yes

7> Do we need to add cache-control to response header with max-age as well to cache files in dispatcher ? /rule section is not enough ?

max-age is optional.

3 replies

Tushar_GuptaAdobe EmployeeAccepted solution
Adobe Employee
July 28, 2022

1> Where can we configure caching rules for CDN? - 

<LocationMatch "^/content/.*\.(html)$">
     Header set Cache-Control "max-age=200"
     Header set Surrogate-Control "max-age=3600"
     Header set Age 0
</LocationMatch>

these TTL's will be respected by Dispatcher/CDN both

 

2> In dispatcher we have /cache section within which we have /rule section to define which all are the files to be cached and /invalidate section to define which all are files to be considered for invalidating. so my question is , what happens to the files which are part of /rule section but not part of /invalidate section.

they will not cache on dispatcher

https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/dispatcher-configuration.html?lang=en 

3>In our project all most all files are allowed to cache in /rule section but in /invalidate section only .html and mode.json is present . so how will clientlibs and dam assets gets invalidated ?

it should be on TTL basis.

 

4> Should we cache assets are not ? what is the standard ?

Yes.

5> What are must cache files in any aem sites.  

Assets and try to cache whatever you can.

6> Do we still use dispatcher flush agents in publihs for invalidation of cache in AEMaaCS?

yes

7> Do we need to add cache-control to response header with max-age as well to cache files in dispatcher ? /rule section is not enough ?

max-age is optional.

Level 4
August 2, 2022

@tushar_gupta  

@arunpatidar  @lukasz-m  @sachin_arora_ : please give your view on this

Level 4
August 18, 2022

The filter set headers from publisher and Apache from dispatcher, SO if you have at either place it will work.

Just make sure you allow those headers from dispatcher rules


@arunpatidar  thanks for the reply.

1> Does both dispatcher and CDN cache gets cleared on each deployment?

2> As per my unserstanding clientlib versioning means , everytime you make new release new version gets added to clientlibs and same will be called inside html files, but what happens to the old clientlibs which are cached inside dispatcher and CDN ? after new release new clientlib gets called and gets cached as old new will replace with new path in html files but what happens to old cached clientlibs , how will that gets flushed in dispatcher and CDN ?

@tushar_gupta  please you also give your inputs.

Adobe Employee
July 28, 2022
Himanshu_Jain
Community Advisor
Community Advisor
July 29, 2022