-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
help wantedExtra attention is neededExtra attention is needed
Description
We use cachified in many different contexts in our apps, and we love it.
And we would really love to have the possibility to see cache status from a cache result, in some way or another.
const cachifiedResult = await cachifiedWithMetadata({
key: `user-${userId}`,
cache: ourCache,
async getFreshValue() {
...
},
ttl: 300_000,
});
console.log(cachifiedResult.status) // "HIT", "MISS" or "REVALIDATING"
console.log(cachifiedResult.value) // Cached, or fresh valuerognstadragnar, Xiphe and ptts
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed