Commit 2eca44dd authored by Nicolas Delaby's avatar Nicolas Delaby

Delete cached_value if expired

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29456 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7def223f
......@@ -141,10 +141,13 @@ class DistributedRamCache(BaseCache):
cache_storage = self.getCacheStorage()
cache_id = self.checkAndFixCacheId(cache_id, scope)
cache_entry = cache_storage.get(cache_id)
if isinstance(cache_entry, CacheEntry) and not cache_entry.isExpired():
return True
to_return = False
if isinstance(cache_entry, CacheEntry):
if cache_entry.isExpired():
del cache_storage[cache_id]
else:
return False
to_return = True
return to_return
def getScopeList(self):
## memcached doesn't support namespaces (cache scopes) neither getting cached key list
......
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