问题
Right now, I am working on Airbnb Superset project for working purpose.
I know Superset supports cache (by Flask-Cache), but I got stuck when I set up the configuration.
My config.py file looks like this:
CACHE_DEFAULT_TIMEOUT = 60 * 60 * 24
CACHE_CONFIG = {'CACHE_TYPE': 'filesystem',
'CACHE_DIR': os.path.join(BASE_DIR, '/temp'),
'CACHE_DEFAULT_TIMEOUT': CACHE_DEFAULT_TIMEOUT,
}
But after I re-start the server, there is no different.
Does anyone know how to set up? Thanks.
回答1:
I have set up the same config. It works. Although I still cannot find the cache file from CACHE_DIR
, but from the logging, I can see the message loaded_from_source
when I first view the dashboards/slices and will show loaded_from_cache
within the cache timeout after first visit.
来源:https://stackoverflow.com/questions/48435743/how-to-set-up-superset-config-for-caching