Use previous cached value on cached functions #3696
Unanswered
pabloraissiguier
asked this question in
Q&A
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.
-
Hi community!
I'm working on a nuxt app and using Nitro cached functions for some tasks that require an external api. I was wondering if there's a way to access the previously stored entry in cache before updating it on swr situations, without doing another getItem in the storage.
I don't know if this is a good idea to add to the cache function handlers to make it work like a watcher, where we get the chance of getting the previous value and perform some validations on the update.
Is this something that is already available? Is this something that is planned for the future? Is this a bad idea am I having? 😂
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions