Persisted GraphQL query caching max-age issue with AEM on-prem and CDN | Community
Skip to main content
Level 2
April 13, 2023
Solved

Persisted GraphQL query caching max-age issue with AEM on-prem and CDN

  • April 13, 2023
  • 1 reply
  • 905 views

We are using AEM on-prem and have created a persisted GraphQL query on author using cUrl. Following the instructions from this link, we have used "surrogate-control": {"max-age":300} to set the CDN cache at the persisted query level. After replicating it, we have tested the CDN URL of this query and confirmed that the query works well. However, we have noticed that the CDN cache doesn't expire as expected. It gets expired only after about 1 minute, not 300 seconds as we set it, as we check the X-Cache response header. We have tried changing the max-age value, adding "cache-control": { "max-age": 300 }, but the issue persists. Can anyone suggest a solution to this issue?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Ritesh_Mittal
Community Advisor and Adobe Champion
Ritesh_MittalCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
May 17, 2023