mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
chore(cache): default to SimpleCache in debug mode (#18976)
* chore(cache): default to SimpleCache in debug mode * lint * clean up type * use util * fix integration test cache configs * remove util from cache manager * remove trailing comma * fix more tests * fix truthiness check * fix tests and improve deprecation notice * fix default cache threshold * move debug check to cache_manager * remove separate getter * update docs * remove default cache config
This commit is contained in:
@@ -43,7 +43,7 @@ class TestCache(SupersetTestCase):
|
||||
@pytest.mark.usefixtures("load_birth_names_dashboard_with_slices")
|
||||
def test_no_data_cache(self):
|
||||
data_cache_config = app.config["DATA_CACHE_CONFIG"]
|
||||
app.config["DATA_CACHE_CONFIG"] = {"CACHE_TYPE": "null"}
|
||||
app.config["DATA_CACHE_CONFIG"] = {"CACHE_TYPE": "NullCache"}
|
||||
cache_manager.init_app(app)
|
||||
|
||||
slc = self.get_slice("Girls", db.session)
|
||||
@@ -68,9 +68,8 @@ class TestCache(SupersetTestCase):
|
||||
cache_default_timeout = app.config["CACHE_DEFAULT_TIMEOUT"]
|
||||
app.config["CACHE_DEFAULT_TIMEOUT"] = 100
|
||||
app.config["DATA_CACHE_CONFIG"] = {
|
||||
"CACHE_TYPE": "simple",
|
||||
"CACHE_TYPE": "SimpleCache",
|
||||
"CACHE_DEFAULT_TIMEOUT": 10,
|
||||
"CACHE_KEY_PREFIX": "superset_data_cache",
|
||||
}
|
||||
cache_manager.init_app(app)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user