Skip to content

Commit a349704

Browse files
acdharobhudson
authored andcommitted
Cleaned up cache panel slightly.
* Removed unused import * .delete() referenced an undefined variable Signed-off-by: Rob Hudson <rob@cogit8.org>
1 parent 5701e1f commit a349704

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

debug_toolbar/panels/cache.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import time
22
import inspect
3-
try:
4-
from cStringIO import StringIO
5-
except ImportError:
6-
import StringIO
3+
74
from django.core import cache
85
from django.core.cache.backends.base import BaseCache
96
from django.template.loader import render_to_string
@@ -53,7 +50,7 @@ def set(self, key, value, timeout=None):
5350

5451
def delete(self, key):
5552
t = time.time()
56-
self.instance.delete(key, value)
53+
self.cache.delete(key)
5754
this_time = time.time() - t
5855
self.total_time += this_time * 1000
5956
self.deletes += 1

0 commit comments

Comments
 (0)