Expand my Community achievements bar.

SOLVED

Flush the GraphQL Persisted Query while publishing Content Fragment

Avatar

Community Advisor

Hi,

Trying to flush the response of the GraphQL Peristed query when the corresponding content fragment is modified and published.

For achieving the same, tried to configure the rule in the "ACS AEM Commons - Dispatcher Flush Rules"

Rule - /content/dam/mysite/contentfragment/.*=/graphql/execute.json/mysite

 

Any pointer will help.

Thanks

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

You can check the comment section of this page https://adobe-consulting-services.github.io/acs-aem-commons/features/dispatcher-flush-rules/index.ht... ,

Sample given for content fragments, you can try similar one

 

For clearing the cache of content fragments that are accessed via the API Assets using a URL such as /api/assets/somepath.json, you can use the rule:

prop.replication-action-type="INHERIT"
prop.rules.hierarchical=["/content/dam/(.*)=/api/assets/$1"]

You may also need to add a rule to your Dispatcher /invalidate section to clear .json files like this:
/4444 { /glob "*.json" /type "allow" }

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

You can check the comment section of this page https://adobe-consulting-services.github.io/acs-aem-commons/features/dispatcher-flush-rules/index.ht... ,

Sample given for content fragments, you can try similar one

 

For clearing the cache of content fragments that are accessed via the API Assets using a URL such as /api/assets/somepath.json, you can use the rule:

prop.replication-action-type="INHERIT"
prop.rules.hierarchical=["/content/dam/(.*)=/api/assets/$1"]

You may also need to add a rule to your Dispatcher /invalidate section to clear .json files like this:
/4444 { /glob "*.json" /type "allow" }