diff --git a/jsoncache/ApplicationCache.py b/jsoncache/ApplicationCache.py index 35fd7d6..b5f7b8c 100644 --- a/jsoncache/ApplicationCache.py +++ b/jsoncache/ApplicationCache.py @@ -92,14 +92,14 @@ class ApplicationCache(): def cache_anything(self, key_prefix: str = None, max_age: int = None, packer = IDENTITY, unpacker = IDENTITY): def decorator(fun): - key_prefix = key_prefix or fun.__name__ + cache_prefix = key_prefix or fun.__name__ @wraps(fun) def decorated(*args, no_cache: bool = False, cache_no_lookup: bool = False, cache_no_store: bool = False, **kwargs): cache_no_lookup = no_cache or cache_no_lookup cache_no_store = no_cache or cache_no_store no_cache_key = cache_no_lookup and cache_no_store if not no_cache_key: - cache_key = self.gen_key(key_prefix, args, kwargs) + cache_key = self.gen_key(cache_prefix, args, kwargs) if not cache_no_lookup: cached_data = self.load(key=cache_key, max_age=max_age) if cached_data is not None: