Do memcached accounting on the memcached repopulating commands.

(imported from commit 56b30c04e7aee9c9d8493d872b3b367f2be14262)
This commit is contained in:
Tim Abbott
2013-05-13 12:11:53 -04:00
parent 72a7780c57
commit c6f04a2c75
2 changed files with 11 additions and 6 deletions

View File

@@ -90,13 +90,13 @@ def cache_get_many(keys, cache_name=None):
memcached_stats_finish()
return ret
def cache_set_many(items, cache_name=None):
def cache_set_many(items, cache_name=None, timeout=None):
memcached_stats_start()
if cache_name is None:
cache_backend = djcache
else:
cache_backend = get_cache(cache_name)
ret = cache_backend.set_many(items)
ret = cache_backend.set_many(items, timeout=timeout)
memcached_stats_finish()
return ret