web/hdalab/utils.py
changeset 271 8f77cf71ab02
parent 265 73f19fa4f997
child 272 1c774f7a0341
--- a/web/hdalab/utils.py	Fri Nov 16 18:12:05 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-Created on Mar 13, 2012
-
-@author: ymh
-'''
-from django.core.cache import cache
-from django.utils.encoding import smart_str
-import md5
-import re
-
-
-def fix_cache_key(key):
-    cache_key = re.sub(r'\s+', '-', key)
-    cache_key = smart_str(cache_key)
-    if len(cache_key) > (250-(2+len(cache.key_prefix)+len(str(cache.version)))-33):
-        cache_key = cache_key[:(250-(2+len(cache.key_prefix)+len(str(cache.version)))-33)] + '-' + md5.new(cache_key).hexdigest()
-    return cache_key
\ No newline at end of file