Skip to main content
Level 4
Jan 23, 2017 11:27 AM UTC
Solved

Invalidate cache with one CURL commnad

Hi All,

After every PROD deployment we were clearing entire cache, with the below CURL.

curl -H "CQ-Action: DELETE" -H "CQ-Handle: /" -H "Content-Length: 0" -H "Content-Type: application/octet-stream" --noproxy .com http://<HostName>:80/dispatcher/invalidate.cache

We had a thought rather that clearing entire cache, we will invalidate it, we tried few CURL's below:-

This did not work for root portion:-

curl -H "CQ-Action: Activate" -H "CQ-Handle: /" -H "Content-Length: 0" -H "Content-Type: application/octet-stream" --noproxy .com http://<HostName>:80/dispatcher/invalidate.cache

It worked when we have included specific site caching path as below, this will create a big script we need to modify when ever new sites gets added:-

curl -H "CQ-Action: Activate" -H "CQ-Handle: /content/<sitename>" -H "Content-Length: 0" -H "Content-Type: application/octet-stream" --noproxy .com http://<HostName>:80/dispatcher/invalidate.cache

Is there any way we can invalidate cache with one command.

Thanks,

Viki

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
Adobe Employee
Feb 8, 2017 9:13 PM UTC

Hi,

the easiest way to invalidate the dispatcher cache would be to execute a command like this on the system where the dispatcher runs:

$ find . -name ".stat" -exec touch {} \;

This touches every stat file and marks the files as invalid.

kind regards,
Jörg

4 replies

jantzen_b
Adobe Employee
Adobe Employee
Jan 23, 2017 5:58 PM UTC

Hi Viki,

Are you using Akamai to host your DTM environment or are you self-hosting?

Thank you,
Jantzen

Translate
Level 4
Jan 24, 2017 9:35 AM UTC

Hi Jantzen,

We dont have Akamai, we are self hosting.

Thanks,

viki

Translate
jantzen_b
Adobe Employee
Adobe Employee
Feb 8, 2017 8:37 PM UTC

Hi Viki,

I spoke with a DTM engineer about this and he recommended speaking with the AEM team since this is specific to AEM. I'm going to move this thread to our AEM community. The community there is very active and you should have better luck finding an answer.

 

Regards,
Jantzen

Translate
joerghoh
Adobe Employee
joerghohAdobe EmployeeAccepted solution
Adobe Employee
Feb 8, 2017 9:13 PM UTC

Hi,

the easiest way to invalidate the dispatcher cache would be to execute a command like this on the system where the dispatcher runs:

$ find . -name ".stat" -exec touch {} \;

This touches every stat file and marks the files as invalid.

kind regards,
Jörg

Translate