mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +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:
@@ -55,7 +55,11 @@ def set_and_log_cache(
|
||||
if isinstance(cache_instance.cache, NullCache):
|
||||
return
|
||||
|
||||
timeout = cache_timeout if cache_timeout else config["CACHE_DEFAULT_TIMEOUT"]
|
||||
timeout = (
|
||||
cache_timeout
|
||||
if cache_timeout is not None
|
||||
else app.config["CACHE_DEFAULT_TIMEOUT"]
|
||||
)
|
||||
try:
|
||||
dttm = datetime.utcnow().isoformat().split(".")[0]
|
||||
value = {**cache_value, "dttm": dttm}
|
||||
|
||||
Reference in New Issue
Block a user