def connect_to_cache(host: str, port: int, password: str,
poolsize: int, db: int) -> aioredis.pool:
global cachepool
cachepool = await aioredis.create_pool((host, port), password=password,
db=db, maxsize=poolsize,
encoding="utf-8")
return cachepool
评论列表
文章目录