pagecache: Show memcached errors in app logs when writes fail.

This gives us a little more information on failed writes to the
pagecache, though we probably won't see any because of no_reply mode.
This commit is contained in:
Neil Williams
2012-09-22 13:39:58 -07:00
parent 1c290ef114
commit d86a7fe89f

View File

@@ -674,9 +674,11 @@ class MinimalController(BaseController):
g.rendercache.set(self.request_key(),
(response, c.cookies),
g.page_cache_time)
except MemcachedError:
# the key was too big to set in the rendercache
g.log.debug("Ignored too-big render cache")
except MemcachedError as e:
# this codepath will actually never be hit as long as
# the pagecache memcached client is in no_reply mode.
g.log.warning("Ignored exception (%r) on pagecache "
"write for %r", e, request.path)
# send cookies
for k,v in c.cookies.iteritems():