summaryrefslogtreecommitdiff
path: root/main/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'main/utils.py')
-rw-r--r--main/utils.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/main/utils.py b/main/utils.py
index 81093e2a..eadd8550 100644
--- a/main/utils.py
+++ b/main/utils.py
@@ -2,6 +2,7 @@ try:
import cPickle as pickle
except ImportError:
import pickle
+from django.core.cache import cache
from django.utils.hashcompat import md5_constructor
def cache_function(length):
@@ -18,8 +19,6 @@ def cache_function(length):
"""
def decorator(func):
def inner_func(*args, **kwargs):
- from django.core.cache import cache
-
raw = [func.__name__, func.__module__, args, kwargs]
pickled = pickle.dumps(raw, protocol=pickle.HIGHEST_PROTOCOL)
key = md5_constructor(pickled).hexdigest()