Using 'watch' to maintain a cache #14416
Unanswered
cameronelliott
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.
-
It seems like this should be straight forward, but I haven't found it explained anywhere.
I want to use 'watch' to maintain a local in-memory cache of a prefix matched range of key values.
Let's say the prefix is '' for everything for simplicities sake.
I want my cache to contain: the current set of all key vals PLUS receive updates using watch.
Is the best way to do this, these two operations:
(this order is important for race condition reasons)
Using a watch with revision = 1 does not seem a good option for obvious reasons.
Thanks for any feedback.
Beta Was this translation helpful? Give feedback.
All reactions