This fixes #24. Looking at aioredis library, the client.py keyword for set is now 'ex', not 'expire'. Tested this fix and fast-cache now works without issue.

This commit is contained in:
David Velez
2021-07-22 10:17:52 -05:00
parent 0bc8c6c20e
commit 2dd37b09ab

View File

@@ -19,7 +19,7 @@ class RedisBackend(Backend):
return await self.redis.get(key)
async def set(self, key: str, value: str, expire: int = None):
return await self.redis.set(key, value, expire=expire)
return await self.redis.set(key, value, ex=expire)
async def clear(self, namespace: str = None, key: str = None) -> int:
if namespace: