3

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

TylerH
  • 20,799
  • 66
  • 75
  • 101
Pompey Magnus
  • 2,191
  • 5
  • 27
  • 40

1 Answers1

7

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

BrommD
  • 86
  • 1
  • Remember, you do create this sequence for each cache you require, ending with multiple almost same looking blocks of configure... – BrommD May 06 '22 at 17:42