in Time-based Revalidation, stale data should not be returned #68245
meiwenlong
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
1.in Time-based Revalidation,After the revalidate time, the first request come in ,will not return the cached (now stale) data,until the cache data updating is done ,return the freshed data
2.
3.
Non-Goals
Background
by now,in Time-based Revalidation,After the revalidate time, the first request come in ,will still return the cached (now stale) data. until the sencond request,the freshed data will be returned.
This creates a poor user experience,Imagine this scenario: the backend database is updated, and the user starts accessing it, but still gets the old data. He needs to refresh the browser twice to see the new data, which makes the user frustrated.
From a design perspective, this is unreasonable too,The data has been clearly identified as expired,it should not be returned to the user,the request should wait when the cache is stale until the cache do the data update,then return the freshed data
Proposal
see the goals
Beta Was this translation helpful? Give feedback.
All reactions