gae_memcache.clear(), thanks Matt

This commit is contained in:
mdipierro
2012-09-14 21:17:01 -05:00
parent 4031b49d77
commit b52cf468af
2 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.0.9 (2012-09-14 16:08:21) stable Version 2.0.9 (2012-09-14 21:16:55) stable
+6 -4
View File
@@ -47,10 +47,12 @@ class MemcacheClient(Client):
self.set((time.time(), value)) self.set((time.time(), value))
return value return value
def clear(self, key): def clear(self, key = None):
key = '%s/%s' % (self.request.application, key) if key:
self.delete(key) key = '%s/%s' % (self.request.application, key)
self.delete(key)
else:
self.flush_all()