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 Gems Webinar] Accelerating Experience Manager as a Cloud Service development with Rapid Development Environments
Adobe Summit 2023 | Complete list of AEM Sessions & Labs
SOLVED

Invalidating cache on a specific folder

Avatar

Level 2

Hi everyone,

I would like to ask if it's possible to invalidate a cache on a specific folder?

(Ex: /etc/designs/my-app/headlibs/images/)

I've already checked the help files but only found at a folder level [0]

[0] - https://docs.adobe.com/docs/en/dispatcher/disp-config.html#Invalidating Files by Folder Level

Here's the example i've done on my publish-farm.any configuration

/invalidate

  {

  /0000

   {

   /glob "*"

   /type "deny"

   }

  /0001

   {

   /glob "*.html"

   /type "allow"

   }

  /0002 {

   /glob "*/etc/designs/my-app/headlibs/images/*"  

   /type "deny"

   } 

  }

Thanks in advance

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

When this is in the "invalidate" section of your dispatcher.any, you should set it to "allow". Then it will get invalidated (otherwise a version cached once is never going to be invalidated and replaced by newer versions).

Btw: You should use versioned clientlibs of ACS AEM Commons, which solves the problem of mutable CSS/JS Files elegantly 🙂 Then you don't need to invalidate them on the dispatcher cache any more.

Jörg

View solution in original post

0 Replies

Avatar

Employee Advisor

Why do you deny the invalidation of /etc/designs//my-apps/headlibs/images/? Assuming that there are no .html files you want to invalidate.

Jörg

Avatar

Level 2

Hi Jörg,

Oh sorry so it should be "allow" not deny am i correct? But is the implementation correct?

0002 {

   /glob "*/etc/designs/my-app/headlibs/images/*" 

   /type "allow"

   }

Avatar

Correct answer by
Employee Advisor

When this is in the "invalidate" section of your dispatcher.any, you should set it to "allow". Then it will get invalidated (otherwise a version cached once is never going to be invalidated and replaced by newer versions).

Btw: You should use versioned clientlibs of ACS AEM Commons, which solves the problem of mutable CSS/JS Files elegantly 🙂 Then you don't need to invalidate them on the dispatcher cache any more.

Jörg

Avatar

Level 2

Thanks that was really helpful. Will try to implement it and see the results