apache-supersetredis-cache

My Superset cache is set to Redis, but I still get cache warning in logs


I am getting cache warnings in my log files and am not sure why.

My cache override:

CACHE_CONFIG = {
    'CACHE_TYPE': 'RedisCache',
    'CACHE_DEFAULT_TIMEOUT': 86400,
    'CACHE_KEY_PREFIX': 'superset_',
    'CACHE_REDIS_HOST': 'localhost',
    'CACHE_REDIS_PORT': 6379,
    'CACHE_REDIS_DB': 1,
    'CACHE_REDIS_URL': 'redis://localhost:6379/1'
}

I also tried redis instead of RedisCache

the log statements:

2022-05-06 15:03:27,118:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'> Falling back to the built-in cache, that stores data in the metadata database, for the following cache: FILTER_STATE_CACHE_CONFIG. It is recommended to use RedisCache, MemcachedCache or another dedicated caching backend for production deployments 2022-05-06 15:03:27,123:WARNING:superset.utils.cache_manager:Falling back to the built-in cache, that stores data in the metadata database, for the following cache: FILTER_STATE_CACHE_CONFIG. It is recommended to use RedisCache, MemcachedCache or another dedicated caching backend for production deployments Falling back to the built-in cache, that stores data in the metadata database, for the following cache: EXPLORE_FORM_DATA_CACHE_CONFIG. It is recommended to use RedisCache, MemcachedCache or another dedicated caching backend for production deployments


Solution

  • It is a different cache, hence you need an additional configuration, i.e.

    FILTER_STATE_CACHE_CONFIG = {
        'CACHE_TYPE': 'RedisCache',
        'CACHE_DEFAULT_TIMEOUT': 86400,
        'CACHE_KEY_PREFIX': 'superset_filter_',
        'CACHE_REDIS_URL': 'redis://localhost:6379/2'
    }
    

    Ensure to use a different prefix and DB