You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2022/09/14 20:41:52 UTC
[superset] 01/03: fix: cached common bootstrap Revert (#21018) (#21419)
This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch 1.5
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 93611064b490e5d90b2b3a7c250bc1565f0d1125
Author: Daniel Vaz Gaspar <da...@gmail.com>
AuthorDate: Sat Sep 10 01:02:24 2022 +0100
fix: cached common bootstrap Revert (#21018) (#21419)
(cherry picked from commit 094400c308b7e16fbabc9c4287054c298ff95899)
---
superset/views/base.py | 8 +-------
tests/integration_tests/core_tests.py | 4 +---
2 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/superset/views/base.py b/superset/views/base.py
index 2fa98cb69d..ad89719ef8 100644
--- a/superset/views/base.py
+++ b/superset/views/base.py
@@ -71,7 +71,6 @@ from superset.exceptions import (
SupersetException,
SupersetSecurityException,
)
-from superset.extensions import cache_manager
from superset.models.helpers import ImportExportMixin
from superset.models.reports import ReportRecipientType
from superset.superset_typing import FlaskResponse
@@ -347,13 +346,8 @@ def menu_data() -> Dict[str, Any]:
}
-@cache_manager.cache.memoize(timeout=60)
def common_bootstrap_payload() -> Dict[str, Any]:
- """Common data always sent to the client
-
- The function is memoized as the return value only changes based
- on configuration and feature flag values.
- """
+ """Common data always sent to the client"""
messages = get_flashed_messages(with_categories=True)
locale = str(get_locale())
diff --git a/tests/integration_tests/core_tests.py b/tests/integration_tests/core_tests.py
index 3cba31dafd..f4788505c1 100644
--- a/tests/integration_tests/core_tests.py
+++ b/tests/integration_tests/core_tests.py
@@ -62,7 +62,7 @@ from superset.connectors.sqla.models import SqlaTable
from superset.db_engine_specs.base import BaseEngineSpec
from superset.db_engine_specs.mssql import MssqlEngineSpec
from superset.exceptions import SupersetException
-from superset.extensions import async_query_manager, cache_manager
+from superset.extensions import async_query_manager
from superset.models import core as models
from superset.models.annotations import Annotation, AnnotationLayer
from superset.models.dashboard import Dashboard
@@ -1446,8 +1446,6 @@ class TestCore(SupersetTestCase):
"""
Functions in feature flags don't break bootstrap data serialization.
"""
- # feature flags are cached
- cache_manager.cache.clear()
self.login()
encoded = json.dumps(