diff -r 9075dc2fb93c -r b60ab54b6782 src/cm/utils/cache.py --- a/src/cm/utils/cache.py Tue Apr 20 11:37:33 2010 +0200 +++ b/src/cm/utils/cache.py Thu Apr 22 11:32:41 2010 +0200 @@ -1,9 +1,10 @@ from django.core.cache import cache +from hashlib import sha1 # adapted [to django] from http://code.activestate.com/recipes/325205/ def dj_memoize(f): def g(*args, **kwargs): - key = ( f.__name__, f, tuple(args), frozenset(kwargs.items()) ) + key = sha1( str((f.__name__, f, tuple(args), frozenset(kwargs.items())) )).hexdigest() val = cache.get(key) if not val: val = f(*args, **kwargs)