diff -r df389c3a9277 -r 8d1ce1bda109 src/cm/utils/cache.py --- a/src/cm/utils/cache.py Tue May 31 18:01:41 2011 +0200 +++ b/src/cm/utils/cache.py Tue May 31 18:03:03 2011 +0200 @@ -1,10 +1,11 @@ from django.core.cache import cache from hashlib import sha1 +from django.conf import settings # adapted [to django] from http://code.activestate.com/recipes/325205/ def dj_memoize(f): def g(*args, **kwargs): - key = sha1( str((f.__name__, f, tuple(args), frozenset(kwargs.items())) )).hexdigest() + key = sha1( str((settings.SITE_URL, f.__name__, f, tuple(args), frozenset(kwargs.items())) )).hexdigest() val = cache.get(key) if not val: val = f(*args, **kwargs)