From 1b7384591f9362ed0969b5fe37ceb00e2d071bba Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Thu, 12 Apr 2012 22:40:56 -0700 Subject: [PATCH] Make sure stats attribute is present on StaleCacheChain. --- r2/r2/lib/cache.py | 1 + 1 file changed, 1 insertion(+) diff --git a/r2/r2/lib/cache.py b/r2/r2/lib/cache.py index ae1d2e42c..a193bff86 100644 --- a/r2/r2/lib/cache.py +++ b/r2/r2/lib/cache.py @@ -511,6 +511,7 @@ class StaleCacheChain(CacheChain): self.realcache = realcache self.caches = (localcache, realcache) # for the other # CacheChain machinery + self.stats = None def get(self, key, default=None, stale = False, **kw): if kw.get('allow_local', True) and key in self.caches[0]: