How to always serve fresh content to editors so they see their changes immediately? #4948
Unanswered
maybebansky
asked this question in
Sanity Studio Support
Replies: 1 comment
-
Depending on your framework and setup what you want is to use our GROQ powered webhooks in combination with whatever feature your framework offers for "On Demand Revalidation", or "On Demand ISR/Incremental Static Regeneration". |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For speed and cost savings I'd like to use the CDN version of the API. As the docs say, after Sanity content is edited it can take some time for this change to propagate: https://www.sanity.io/docs/api-cdn#d09568b4f4e3
This is fine for normal users however if an editor makes a change and reloads the live website they will expect to see the change immediately. I imagine this is a common requirement so is there a reccomended solution?
All I can think to do is make the user log in to the live site, and once authenticated use the non-CDN version of the API. However this isn't great for a number of reasons:
I'm new to headless CMSs so not sure if this is just a limitation that comes with the territory?
Beta Was this translation helpful? Give feedback.
All reactions