🤑 wrap virtually everything that can store by key to act as cache with ttl/max-age, stale-while-validate, parallel fetch protection and type-safety support
MIT License
916
stars
26
forks
source link
Update the example in the docs to use a more "realistic" example #32
Just had a bit of confusion with the key, where it wasn't clear that it needs to be dynamic and was treated more like a namespace. It's probably not common but if someone does this it could lead to some really unexpected results.
For example, we want to cache a resource called user and the key was set to user instead of user_${userId}.
I'm happy to update the docs to either switch out the PI example or add another example.
Great library btw, going to keep us out of trouble :)
Just had a bit of confusion with the key, where it wasn't clear that it needs to be dynamic and was treated more like a namespace. It's probably not common but if someone does this it could lead to some really unexpected results.
For example, we want to cache a resource called
user
and the key was set touser
instead ofuser_${userId}
.I'm happy to update the docs to either switch out the PI example or add another example.
Great library btw, going to keep us out of trouble :)