Highlighted

Adding Cache control header for JSON

Avatar

Avatar

jghoshAdobe

Avatar

jghoshAdobe

jghoshAdobe

14-11-2017

Hi,

We have a requirement where we want to cache  form html (simple form on web page) but not the associated JSON with it. We would like to do it by adding "no-cache, no-store, must-revalidate" response header so that Dispatcher, LB, CDN, client browser and all other external Gateway treat them same way and stop caching them at any level.

While we can do this at AEM code level, question is - is there any way to add such header at dispatcher configuration level or any other already available configuration at OSGI which might be readymade to use for similar response header set-up purpose for a specific types of URL?

We believe there is none, but just wanted to check if anyone has any view on that.

Thanks!

Replies

Highlighted

Avatar

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

910

Correct Answer

1.0K

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

910

Correct Answer

1.0K
Jörg_Hoh
Employee

14-11-2017

Hi,

if you need such a solution on AEM: No, that feature is not (yet) there. But I am sure that the ACS AEM Commons people would be very happy about such a contribution 🙂

cheers,

Jörg

Highlighted

Avatar

Avatar

jghoshAdobe

Avatar

jghoshAdobe

jghoshAdobe

14-11-2017

Thanks. Is it possible to modify response header at dispatcher level ? If yes, can you pls give an example?

Highlighted

Avatar

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

910

Correct Answer

1.0K

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

910

Correct Answer

1.0K
Jörg_Hoh
Employee

15-11-2017

You can use mod_expireis.

Jörg