mirror of
https://github.com/long2ice/fastapi-cache.git
synced 2026-03-25 04:57:54 +00:00
@@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
### 0.1.4
|
### 0.1.4
|
||||||
|
|
||||||
|
- Fix setting expire for redis (#24)
|
||||||
|
- Update expire key
|
||||||
- Fix default expire for memcached. (#13)
|
- Fix default expire for memcached. (#13)
|
||||||
- Update default key builder. (#12)
|
- Update default key builder. (#12)
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class RedisBackend(Backend):
|
|||||||
return await self.redis.get(key)
|
return await self.redis.get(key)
|
||||||
|
|
||||||
async def set(self, key: str, value: str, expire: int = None):
|
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:
|
async def clear(self, namespace: str = None, key: str = None) -> int:
|
||||||
if namespace:
|
if namespace:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "fastapi-cache2"
|
name = "fastapi-cache2"
|
||||||
version = "0.1.4"
|
version = "0.1.4.1"
|
||||||
description = "Cache for FastAPI"
|
description = "Cache for FastAPI"
|
||||||
authors = ["long2ice <long2ice@gmail.com>"]
|
authors = ["long2ice <long2ice@gmail.com>"]
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user