ktmud commented on a change in pull request #18976:
URL: https://github.com/apache/superset/pull/18976#discussion_r817870166
##########
File path: superset/utils/cache_manager.py
##########
@@ -28,41 +34,47 @@ def __init__(self) -> None:
self._filter_state_cache = Cache()
self._explore_form_data_cache = Cache()
+ @staticmethod
+ def _init_cache(
+ app: Flask, cache: Cache, cache_config_key: str, required: bool = False
+ ) -> None:
+ cache_config = app.config[cache_config_key]
+ cache_type = cache_config.get("CACHE_TYPE")
+ if app.debug and cache_type is None:
+ cache_threshold = cache_config.get("CACHE_THRESHOLD", math.inf)
+ cache_config.update(
+ {"CACHE_TYPE": "SimpleCache", "CACHE_THRESHOLD":
cache_threshold,}
Review comment:
I'm surprised this is not catched by `black`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]