-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
We currently have dedupingInterval
option, which acts as a soft TTL for cached values, meaning that after this timeout hits we still use cached value but need to revalidate it.
I propose adding maxAge
option, which would act as a hard TTL, meaning that when this timeout we can no longer use cached value, and have to hard revalidate it (return undefined / suspense depending on options).
This effectively allows to create a boundary, where stale value is okay to use, and the timeline would look something like this:
I believe after #231 gets merge this could be possible to do outside of the library by clearing the cache when maxAge
hits, but I believe this feature is good enough to be built-in
embeddedt, javascripter, baer, majelbstoat, lynxtaa and 6 more
Metadata
Metadata
Assignees
Labels
No labels