cache.py 283 B

12345678910111213
  1. import redis
  2. from app.core.config import settings
  3. pool = redis.ConnectionPool(
  4. host=settings.REDIS_HOST,
  5. port=settings.REDIS_PORT,
  6. db=settings.REDIS_DB,
  7. password=settings.REDIS_PASSWORD,
  8. decode_responses=True
  9. )
  10. redis_client = redis.Redis(connection_pool=pool)