I want to use redis as cache server in Flask-caching, the config looks like this,
cache = Cache(config={'CACHE_TYPE': 'redis',
'CACHE_REDIS_HOST': redis,
'CACHE_REDIS_PORT': 6379
})
the 'CACHE_REDIS_HOST' should be the container(service) name i defined in my docker-compose.yml, because i want to cache the data in other container.
redis:
image: "redis:latest"
ports:
- '6379:6379'
But it wont work this way.
how can i get to this? Please help, thanks a lot.