Invalidating cache on a specific folder | Community
Skip to main content
bruticuss
Level 2
June 21, 2017
Solved

Invalidating cache on a specific folder

  • June 21, 2017
  • 5 replies
  • 1889 views

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

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 joerghoh

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

5 replies

kautuk_sahni
Community Manager
Community Manager
June 22, 2017

Jörg Hoh​ Need your help here!!

~kautuk

Kautuk Sahni
joerghoh
Adobe Employee
Adobe Employee
June 22, 2017

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

bruticuss
bruticussAuthor
Level 2
June 28, 2017

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"

   }

joerghoh
Adobe Employee
joerghohAdobe EmployeeAccepted solution
Adobe Employee
June 28, 2017

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

bruticuss
bruticussAuthor
Level 2
June 28, 2017

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