From e8b9734145e8a8c4cf01dcf0cdc5d8404fe68e1c Mon Sep 17 00:00:00 2001 From: Erle Carrara Date: Wed, 9 Oct 2024 00:22:49 -0300 Subject: [PATCH] bug fix: redis ttl always set to None --- src/yapcache/__about__.py | 2 +- src/yapcache/caches/redis.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/yapcache/__about__.py b/src/yapcache/__about__.py index bbab024..1276d02 100644 --- a/src/yapcache/__about__.py +++ b/src/yapcache/__about__.py @@ -1 +1 @@ -__version__ = "0.1.4" +__version__ = "0.1.5" diff --git a/src/yapcache/caches/redis.py b/src/yapcache/caches/redis.py index e388847..da0c6e3 100644 --- a/src/yapcache/caches/redis.py +++ b/src/yapcache/caches/redis.py @@ -30,7 +30,7 @@ async def get(self, key: str) -> CacheItem | NotFound: if ttl == -2: return NOT_FOUND - if ttl == -1 or ttl: + if ttl == -1: ttl = None value = self.serializer.loads(value)