Currently I am using Redis for my Flask app and having the configuration as below.
redis_config = redis.StrictRedis(
host='myhost',
port=myport,
db=0,
username='',
password='mypass',
ssl=True,
ssl_cert_reqs='required',
ssl_ca_certs='redis_certs/ca.crt',
ssl_certfile='redis_certs/client.crt',
ssl_keyfile='/redis_certs/client.key',
) and then passing the same to cache config.
CACHE_CONFIG = {
'CACHE_TYPE': 'redis',
'CACHE_DEFAULT_TIMEOUT': 60 * 60 * 24, # 1 day default (in secs)
'CACHE_KEY_PREFIX': 'someprefix',
#'CACHE_REDIS_URL': 'redis://xyz:1234/1',
'CACHE_REDIS_HOST': redis_config,
}
If I want to change the config to redis_sentinel instead of Redis for better availibality. I am not able to understand the configuration mentioned in Flask-cachig doc.
CACHE_KEY_PREFIX
CACHE_REDIS_SENTINELS
CACHE_REDIS_SENTINEL_MASTER
CACHE_REDIS_PASSWORD
CACHE_REDIS_DB
and how to configure along with SSl? I am new to redis and did not find anything helpful resource online.