MoreValue
Ask MoreValueExplore CollectionsMy Collections
Sign in
Website
NextJS Things

Gotchas of unstable_cache

- Use `unstable_cache()` if you don’t want to rerun time consuming function at every request on a lambda route (dynamically rendered route at request time) - Cache Keys/`keyParts` are used to identify and differentiate cached function results. - `unstable_cache` can still be invalidated just like how one invalidate cache in fetch calls. - They are `unstable` for a reason and workarounds is still needed to achieve ideal behavior (see the gotchas)

CB
Christof Brungräber

updated 267 days ago

(0)

Average score

4,440

Total views

Back to collection

NextJS Things

https://alfonsusardani.notion.site/unstable_cache-from-next-cache-f300b3184d6a472ea5282543d50b9f02