time_expire=0 should clear memcache entry
If time_expire=0, then the cache should be cleared and reset with the latest value to stay compatible with documented web2py functionality of how caching works. Previous change broke this compatibility while adding efficiency in other cases.
This commit is contained in:
1 parent
53ecc17b57
commit
222b087a8d
1 file changed
+1
-1
@@ -32,7 +32,7 @@ class MemcacheClient(object):
|
||||
|
||||
key = '%s/%s' % (self.request.application, key)
|
||||
value = None
|
||||
obj = self.client.get(key)
|
||||
obj = self.client.get(key) if time_expire != 0 else None
|
||||
if obj:
|
||||
value = obj[1]
|
||||
elif f is not None:
|
||||
|
||||
Reference in new issue
Block a user