AEM Dispatcher Invalidation CQ-Action Query

Avatar

Avatar
Level 1
Rampai94
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
Rampai94
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile
Rampai94
Level 1

21-07-2020

Hi All,

 

What is the difference between "CQ-Action: Activate", "CQ-Action: Deactivate", "CQ-Action: Delete" while sending a Curl request to dispatcher to invalidate the cache?

 

Is there any API that lists down these methods?

 

Which action should be used if I simply want to touch the statsfile for the payload?

 

This documentation is a bit confusing as it states that the dispatcher deletes files on "CQ-Action: Activate". And the Curl Commands documentation states that "CQ-Action: Activate" is used to invalidate the cache. For evicting cache, "CQ-Action: Deactivate" is used.

 

Thanks,

Ram

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 250
MVP
ChitraMadan
MVP

Likes

273 likes

Total Posts

165 posts

Correct reply

68 solutions
Top badges earned
Boost 250
Establish
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Boost 250
MVP
ChitraMadan
MVP

Likes

273 likes

Total Posts

165 posts

Correct reply

68 solutions
Top badges earned
Boost 250
Establish
Ignite 1
Give Back 5
Give Back 3
View profile
ChitraMadan
MVP

22-07-2020

Hi @Rampai94 ,

 

This documentation has really good explanation:

https://helpx.adobe.com/uk/experience-manager/kb/ams-dispatcher-manual/disp-flushing.html

 

If this doesn't help, Can you please explain your scenario in a bit more detail please.

Answers (2)

Answers (2)

Avatar

Avatar
Give Back 5
Employee
vanegi
Employee

Likes

392 likes

Total Posts

378 posts

Correct reply

148 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile

Avatar
Give Back 5
Employee
vanegi
Employee

Likes

392 likes

Total Posts

378 posts

Correct reply

148 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile
vanegi
Employee

23-07-2020

These actions define the ReplicationActionType :

  • ACTIVATE: Invalidates the cached files opposed to deleting
  • DELETE: Deletes the cached files opposed to invalidating

 

And used for Dispatcher Flush agents and specify elements that must be flushed.

For a Dispatcher Flush agent the three standard entries should not need changing:

  • CQ-Action:{action}
  • CQ-Handle:{path}
  • CQ-Path:{path}

These are used, as appropriate, to indicate the action to be used when flushing the handle or path. The sub-parameters are dynamic:

  • {action} indicates a replication action
  • {path} indicates a path

They are substituted by the path/action relevant to the request and therefore do not need to be “hardcoded”:

 

Note:

If you have installed AEM in a context other than the recommended default context, then you will need to register the context in the HTTP Headers. For example:
CQ-Handle:/<yourContext>{path}

Avatar

Avatar
Give Back 50
Employee
berliant
Employee

Likes

207 likes

Total Posts

315 posts

Correct reply

98 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Give Back 50
Employee
berliant
Employee

Likes

207 likes

Total Posts

315 posts

Correct reply

98 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
berliant
Employee

22-07-2020

Content paths can either be invalidated or flushed from the AEM Dispatcher cache.

AEM Dispatcher behavior - invalidate performs a cache invalidation, similar to when content is activated from author to publish (CQ-Action: Activate, CQ-Action: Deactivate) flush performs a cache deletion (CQ-Action: Delete).
In general, the use of the invalidate action is preferable but there may be cases where flushing is required, especially when using AEM HTML Client Libraries.