local-llm-server/llm_server/routes/cache.py

6 lines
204 B
Python

from flask_caching import Cache
from redis import Redis
cache = Cache(config={'CACHE_TYPE': 'RedisCache', 'CACHE_REDIS_URL': 'redis://localhost:6379/0', 'CACHE_KEY_PREFIX': 'local-llm'})
redis = Redis()