Be more lenient in what we accept in cache.get() and cache.put()
authorSverre Rabbelier <srabbelier@gmail.com>
Mon, 23 Feb 2009 19:51:41 +0000
changeset 1476 ef8e8de75ebb
parent 1475 22b63ab59b27
child 1477 c724a6eda7ef
Be more lenient in what we accept in cache.get() and cache.put() This makes testing easier. Patch by: Sverre Rabbelier
app/soc/cache/sidebar.py
--- a/app/soc/cache/sidebar.py	Mon Feb 23 18:27:14 2009 +0000
+++ b/app/soc/cache/sidebar.py	Mon Feb 23 19:51:41 2009 +0000
@@ -36,7 +36,7 @@
   return 'sidebar_for_%s' % repr(id)
 
 
-def get(id, user):
+def get(id, *args, **kwargs):
   """Retrieves the sidebar for the specified user from the memcache.
   """
 
@@ -44,7 +44,7 @@
   return memcache.get(memcache_key), memcache_key
 
 
-def put(sidebar, memcache_key, id, user):
+def put(sidebar, memcache_key, *args, **kwargs):
   """Sets the sidebar for the specified user in the memcache.
 
   Args: