Expand my Community achievements bar.

SOLVED

GraphQL Persisted Query Caching and Invalidation

Avatar

Level 2

Hi,

 

We are trying to enable caching of the persisted query on the dispatcher by following the instructions on https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/headless/deployment...

However, even though the dispatcher is on the latest version, the global variable is not recognized when set. Can you please let me know if there is a specific section of the dispatcher where these variables need to be set?

 

The document also says "the Dispatcher adds the suffix .json to all persisted query URLs, so that the result can be cached.", this means the request to the publisher is with .json and should resolve the query, but unfortunately, that does not seem to do the trick. It just cannot resolve when the request is with the suffix .json on the publisher. 

 

Additionally, I would like to know how to invalidate the response cache of a persistent query. Publishing the content fragment doesn't seem to invalidate the cache. I was not able to find an answer to this in the documentation.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@GuptaNikhil Please check the below posts for the cache clearing

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/invalidating-cache-of-grap...

 

Regarding .json , you need to set .json in the redirect when the calls comes to dispatcher so that dispatcher can cache the result json, otherwise the dispatcher wont cache it 

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

@GuptaNikhil Please check the below posts for the cache clearing

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/invalidating-cache-of-grap...

 

Regarding .json , you need to set .json in the redirect when the calls comes to dispatcher so that dispatcher can cache the result json, otherwise the dispatcher wont cache it 

Avatar

Administrator

@GuptaNikhil  Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni