mirror of
https://github.com/grillazz/fastapi-sqlalchemy-asyncpg.git
synced 2025-11-30 13:20:40 +03:00
wip: cache
This commit is contained in:
@@ -9,3 +9,10 @@ async def get_redis():
|
||||
encoding="utf-8",
|
||||
decode_responses=True,
|
||||
)
|
||||
|
||||
|
||||
async def get_cache():
|
||||
return await redis.from_url(
|
||||
global_settings.redis_url.unicode_string(),
|
||||
decode_responses=False,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user