Permalink
Browse files

Merge pull request #3 from Narsil/patch-2

Update cache_panel.py
  • Loading branch information...
2 parents a6b0f24 + 2c4c117 commit 2ff3c45be962e08f02928d021c61e7008964020a @jbalogh committed Nov 10, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 cache_panel.py
View
@@ -68,7 +68,7 @@ class CacheWrapper(object):
def __init__(self, cache):
# These are the methods we're going to replace.
- methods = 'add clear get set delete get_many'.split()
+ methods = 'add clear get set delete get_many set_many'.split()
# Store copies of the true methods.
self.real_methods = dict((m, getattr(cache, m)) for m in methods)
@@ -105,6 +105,10 @@ def get_many(self, keys):
val = self.real_methods['get_many'](keys)
self.log[-1].hit = bool(val)
return val
+
+ @logged
+ def set_many(self, dict_mapping, timeout=None):
+ return self.real_methods['set_many'](dict_mapping, timeout)
def clear(self):
return self.real_methods['clear']()

0 comments on commit 2ff3c45

Please sign in to comment.