From 645dbe16bf5e88989f9cbdd3f6c94324e605c49b Mon Sep 17 00:00:00 2001 From: Martin Schmidt Date: Wed, 14 Oct 2020 10:32:32 +0200 Subject: [PATCH] Fix inverted parameters for access to cache The cache takes parameters (key, sentinel) but it was called as (sentinel,key). I just inverted the two arguments. --- cachme/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cachme/__init__.py b/cachme/__init__.py index 6e1d096..4cb841c 100644 --- a/cachme/__init__.py +++ b/cachme/__init__.py @@ -160,7 +160,7 @@ def run(self, func, *args, **kwargs): key = self.algorithm.create_key(key_args, key_kwargs, self.include_types) - ret = self.algorithm.get(sentinel, key) + ret = self.algorithm.get(key, sentinel) if ret != sentinel: if self.on_hit is not None: