AEM cloud, where to set image cache headers? | Community
Skip to main content
Level 8
Sep 21, 2021 9:12 AM UTC
Solved

AEM cloud, where to set image cache headers?

in our site, built with AEM cloud, all images have this header:

 

xx.jpg GET 200 www.oursite.com 57.8 kB private, max-age=600, immutable, max-age=300

 

There here are 3 issues:

1) max age should be 30 days, not 300 seconds

2) max-age is specified twice

3) we should really be using s-maxage in conjunction with max-age.

 

Where does one set this?  Do we have to use apache rules to overwrite headers in the cloud dispatcher?

What and where is the current 2x max-age set? It's not in our code or in any of the dispatcher or farms config that we can find.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Umesh_Thakur
Umesh_ThakurAccepted solution
New Participant
Sep 21, 2021 12:45 PM UTC

Hi @tb3dock,

If you have certain pattern of your image then I think you can take advantage of acs.commons.http.headers.impl.DispatcherMaxAgeHeaderFilter.

Please have a look of the below url:

https://adobe-consulting-services.github.io/acs-aem-commons/features/dispatcher-ttl/index.html

 

Hope this will help.

Umesh Thakur

3 replies

Umesh_Thakur
Umesh_ThakurAccepted solution
New Participant
Sep 21, 2021 12:45 PM UTC

Hi @tb3dock,

If you have certain pattern of your image then I think you can take advantage of acs.commons.http.headers.impl.DispatcherMaxAgeHeaderFilter.

Please have a look of the below url:

https://adobe-consulting-services.github.io/acs-aem-commons/features/dispatcher-ttl/index.html

 

Hope this will help.

Umesh Thakur

Translate
TB3dockAuthor
Level 8
Oct 4, 2021 12:06 PM UTC

Hi, we are using AEM cloud, and we have been told this doesnt work with cloud. Are you sure this is a solution?

Translate
Raja-Karuppsamy
New Participant
Sep 21, 2021 10:05 AM UTC

Hi - It must be configured in httpd.conf file . can you please check once.

Translate