Style fixes in soc.cache modules.
Patch by: Pawel Solyga
Reviewed by: to-be-reviewed
--- a/app/soc/cache/base.py Wed Jan 28 11:22:41 2009 +0000
+++ b/app/soc/cache/base.py Wed Jan 28 11:23:19 2009 +0000
@@ -26,14 +26,14 @@
def getCacher(get, put):
- """Returns a caching decorator that uses get and put
+ """Returns a caching decorator that uses get and put.
"""
# TODO(SRabbelier) possibly accept 'key' instead, and define
# get and put in terms of key, depends on further usage
def cache(func):
- """Decorator that caches the result from func
+ """Decorator that caches the result from func.
"""
@wraps(func)
--- a/app/soc/cache/sidebar.py Wed Jan 28 11:22:41 2009 +0000
+++ b/app/soc/cache/sidebar.py Wed Jan 28 11:23:19 2009 +0000
@@ -29,14 +29,14 @@
def key(id):
- """Returns the memcache key for the user's sidebar
+ """Returns the memcache key for the user's sidebar.
"""
return 'sidebar_for_%s' % repr(id)
def get(id, user):
- """Retrieves the sidebar for the specified user from the memcache
+ """Retrieves the sidebar for the specified user from the memcache.
"""
memcache_key = key(id)
@@ -44,7 +44,7 @@
def put(sidebar, id, user):
- """Sets the sidebar for the specified user in the memcache
+ """Sets the sidebar for the specified user in the memcache.
Args:
sidebar: the sidebar to be cached
@@ -58,7 +58,7 @@
def flush(user=None):
- """Removes the sidebar for the current user from the memcache
+ """Removes the sidebar for the current user from the memcache.
Args:
user: defaults to the current user if not set