Make the cache_function key a bit more descriptive

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2010-07-10 16:23:33 -05:00
parent 7ca91098fa
commit 6b4c8e63b3

View File

@ -23,6 +23,7 @@ def inner_func(*args, **kwargs):
raw = [func.__name__, func.__module__, args, kwargs]
pickled = pickle.dumps(raw, protocol=pickle.HIGHEST_PROTOCOL)
key = md5_constructor(pickled).hexdigest()
key = 'cache_function.' + func.__name__ + '.' + key
value = cache.get(key)
if value is not None:
return value