Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges


AEM CS - Avoid Cache for specific file


Level 2

Hello Team,

We have to remove caching for specific file and have configured in vhost with below rules.


# For Remove caching for i18n files
<LocationMatch "^/etc\.clientlibs/myproject/clientlibs/clientlib-site/resources/i18n/.*\.$">
Header Set Pragma "no-cache"
Header Set Cache-Control "max-age=0, no-store, no-cache, must-revalidate"
Header Unset ETag
FileETag None


But file getting cached and seeing response header like below

age: 64439

cache-control: max-age=86400, public


Can you please advise on how we can achieve avoiding cache this ?

1 Accepted Solution


Correct answer by
Community Advisor
2 Replies


Correct answer by
Community Advisor


Level 2

Hi @Nitin_laad thanks for your reply. 


For me, its resolved with below updated expression. I had small issue regex hence path was not matching.


<LocationMatch "^/etc\.clientlibs/myproject/clientlibs/clientlib-site/resources/i18n/.*\.json$">