Commit f90b8e24 authored by Tomi Suomela's avatar Tomi Suomela

try_delete: key name fixed

parent 9ff68794
...@@ -509,7 +509,8 @@ class BaseRedisCache(BaseCache): ...@@ -509,7 +509,8 @@ class BaseRedisCache(BaseCache):
@get_client(write=True) @get_client(write=True)
def try_delete(self, client, key): def try_delete(self, client, key):
"""Remove a key from the cache if not locked.""" """Remove a key from the cache if not locked."""
lock = cache.lock(key, timeout=5) lock_key = "__lock__" + key
lock = cache.lock(lock_key, timeout=5)
acquired = lock.acquire(blocking=False) acquired = lock.acquire(blocking=False)
if acquired: if acquired:
try: try:
......
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