You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cache.set('x', 'yay', version=2)
cache.set('x', 'boo')
cache.get_or_set('x', lambda: 'x', version=2)
> 'boo' # should be 'yay'
cache.get('x')
> 'yay'
It looks like a simple mistake here where it should be
- self.get(key._original_key)
+ self.get(key)
This line looks like it may also be using _original_key incorrectly. I assume redis.ResponseError is raised due to running a version of redis that doesn't support incr and that it would then manually fetch and increment the wrong key.
The text was updated successfully, but these errors were encountered:
AlexRiina
changed the title
get_or_set cache searchs unversioned key before fallbackget_or_set cache searches unversioned key before fallback
Nov 16, 2016
In my django shell, I can run the following
It looks like a simple mistake here where it should be
This line looks like it may also be using
_original_key
incorrectly. I assumeredis.ResponseError
is raised due to running a version of redis that doesn't supportincr
and that it would then manually fetch and increment the wrong key.The text was updated successfully, but these errors were encountered: