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:
ortgit
2014-04-14 01:32:54 -04:00
parent 53ecc17b57
commit 222b087a8d
+1 -1
View File
@@ -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: