Invalidating cache on a specific folder | Community
Skip to main content
bruticuss
Level 2
Jun 21, 2017 5:16 AM UTC
Solved

Invalidating cache on a specific folder

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.
joerghoh
joerghohAccepted solution
Employee
Jun 28, 2017 6:46 AM UTC

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

bruticuss
bruticussAuthor
Level 2
Jun 28, 2017 7:08 AM UTC

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

Translate
joerghoh
joerghohAccepted solution
Employee
Jun 28, 2017 6:46 AM UTC

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

Translate
bruticuss
bruticussAuthor
Level 2
Jun 28, 2017 6:40 AM UTC

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"

   }

Translate
joerghoh
Employee
Jun 22, 2017 11:09 AM UTC

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

Translate
kautuk_sahni
Employee
Jun 22, 2017 8:50 AM UTC

Jörg Hoh​ Need your help here!!

~kautuk

Translate
Kautuk Sahni