How to set up Superset config for caching

纵饮孤独 提交于 2020-06-17 01:52:30

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!