Commit 408dd906 authored by Martin Mahner's avatar Martin Mahner Committed by Stéphane Angel

Pass the origin key to the set method.

parent 10566a15
......@@ -49,10 +49,11 @@ class CacheClass(BaseCache):
Returns ``True`` if the object was added, ``False`` if not.
"""
_key = key
key = self.make_key(key, version=version)
if self._cache.exists(key):
return False
return self.set(key, value, timeout)
return self.set(_key, value, timeout)
def get(self, key, default=None, version=None):
"""
......
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