-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RedisCache #150
RedisCache #150
Conversation
Concrete implementation of ``GlobalCache`` which uses Redis.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your extensive work on this.
"""Implements :meth:`GlobalCache.delete`.""" | ||
self.redis.delete(*keys) | ||
|
||
def watch(self, keys): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is watch() part of the original ndb's spec for caching? I don't understand how they made this work with the memcached api.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
watch
and compare_and_swap
are equivalent to using get
and set
in memcached using CAS tokens. Had to generalize the concept a bit to work with Redis. I also did away with the CAS acronym because it's a bit opaque. (I had to do some Googling when I first encountered it.)
Looks like we have a systems test error, but I'm unclear if it's affected by this PR or due to something else. |
System test error seems to have been transient, related to eventual consistency. We've managed to squash most of those, but one still gets through sometimes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great.
Concrete implementation of
GlobalCache
which uses Redis. Thanks to @takashi8