aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/panels/cache.py
diff options
context:
space:
mode:
Diffstat (limited to 'debug_toolbar/panels/cache.py')
-rw-r--r--debug_toolbar/panels/cache.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/debug_toolbar/panels/cache.py b/debug_toolbar/panels/cache.py
index 5617ec2..c03971d 100644
--- a/debug_toolbar/panels/cache.py
+++ b/debug_toolbar/panels/cache.py
@@ -95,11 +95,15 @@ class CacheDebugPanel(DebugPanel):
def url(self):
return ''
- def content(self):
- context = self.context.copy()
- context.update({
+ def process_response(self, request, response):
+ self.stats = {
'cache_calls': len(self.cache.calls),
'cache_time': self.cache.total_time,
'cache': self.cache,
- })
+ }
+ request.debug_toolbar.stats['cache'] = self.stats
+
+ def content(self):
+ context = self.context.copy()
+ context.update(self.stats)
return render_to_string('debug_toolbar/panels/cache.html', context)