내 커뮤니티 업적 표시줄을 확대합니다.

해결됨

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 채택된 해결책 개

Avatar

정확한 답변 작성자:
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 

원본 게시물의 솔루션 보기

2 답변 개

Avatar

정확한 답변 작성자:
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