Make the cache_function key a bit more descriptive
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
7ca91098fa
commit
6b4c8e63b3
@ -23,6 +23,7 @@ def inner_func(*args, **kwargs):
|
|||||||
raw = [func.__name__, func.__module__, args, kwargs]
|
raw = [func.__name__, func.__module__, args, kwargs]
|
||||||
pickled = pickle.dumps(raw, protocol=pickle.HIGHEST_PROTOCOL)
|
pickled = pickle.dumps(raw, protocol=pickle.HIGHEST_PROTOCOL)
|
||||||
key = md5_constructor(pickled).hexdigest()
|
key = md5_constructor(pickled).hexdigest()
|
||||||
|
key = 'cache_function.' + func.__name__ + '.' + key
|
||||||
value = cache.get(key)
|
value = cache.get(key)
|
||||||
if value is not None:
|
if value is not None:
|
||||||
return value
|
return value
|
||||||
|
Loading…
Reference in New Issue
Block a user