如何设置Superset配置以进行缓存 [英] How to set up Superset config for caching
问题描述
目前,我正在从事Airbnb Superset项目的工作.
我知道Superset支持缓存(通过Flask-Cache),但是在设置配置时卡住了.
我的config.py文件如下:
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,
}
但是在我重新启动服务器之后,没有什么不同.
有人知道如何设置吗?谢谢.
我已经设置了相同的配置.有用.尽管我仍然无法从CACHE_DIR
中找到缓存文件,但是从日志记录中,当我第一次查看仪表板/切片时,可以看到消息loaded_from_source
,并且在第一次访问后将在缓存超时内显示loaded_from_cache
. >
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.
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.
这篇关于如何设置Superset配置以进行缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!