Commit 3afb5a3e authored by wtracyliu's avatar wtracyliu Committed by Sean Bleier

fix a bug when incr delta > 1

parent 45b266aa
......@@ -294,7 +294,7 @@ class CacheClass(BaseCache):
try:
value = self._client.incr(key, delta)
except redis.ResponseError:
value = self.get(key) + 1
value = self.get(key) + delta
self.set(key, value)
return value
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment