From 222b087a8d0f65586807b2c1e7fe136379c79e77 Mon Sep 17 00:00:00 2001 From: ortgit Date: Mon, 14 Apr 2014 01:32:54 -0400 Subject: [PATCH] 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. --- gluon/contrib/gae_memcache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gluon/contrib/gae_memcache.py b/gluon/contrib/gae_memcache.py index 2b0d6842..e20ce96e 100644 --- a/gluon/contrib/gae_memcache.py +++ b/gluon/contrib/gae_memcache.py @@ -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: