-
Notifications
You must be signed in to change notification settings - Fork 28
Feature: metadata/status #143
Copy link
Copy link
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 valueReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed