mirror of https://github.com/apache/superset.git
parent
f1acbaf45d
commit
094400c308
|
@ -71,7 +71,6 @@ from superset.exceptions import (
|
||||||
SupersetException,
|
SupersetException,
|
||||||
SupersetSecurityException,
|
SupersetSecurityException,
|
||||||
)
|
)
|
||||||
from superset.extensions import cache_manager
|
|
||||||
from superset.models.helpers import ImportExportMixin
|
from superset.models.helpers import ImportExportMixin
|
||||||
from superset.reports.models import ReportRecipientType
|
from superset.reports.models import ReportRecipientType
|
||||||
from superset.superset_typing import FlaskResponse
|
from superset.superset_typing import FlaskResponse
|
||||||
|
@ -355,13 +354,8 @@ def menu_data() -> Dict[str, Any]:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@cache_manager.cache.memoize(timeout=60)
|
|
||||||
def common_bootstrap_payload() -> Dict[str, Any]:
|
def common_bootstrap_payload() -> Dict[str, Any]:
|
||||||
"""Common data always sent to the client
|
"""Common data always sent to the client"""
|
||||||
|
|
||||||
The function is memoized as the return value only changes based
|
|
||||||
on configuration and feature flag values.
|
|
||||||
"""
|
|
||||||
messages = get_flashed_messages(with_categories=True)
|
messages = get_flashed_messages(with_categories=True)
|
||||||
locale = str(get_locale())
|
locale = str(get_locale())
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ from superset.connectors.sqla.models import SqlaTable
|
||||||
from superset.db_engine_specs.base import BaseEngineSpec
|
from superset.db_engine_specs.base import BaseEngineSpec
|
||||||
from superset.db_engine_specs.mssql import MssqlEngineSpec
|
from superset.db_engine_specs.mssql import MssqlEngineSpec
|
||||||
from superset.exceptions import SupersetException
|
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 import core as models
|
||||||
from superset.models.annotations import Annotation, AnnotationLayer
|
from superset.models.annotations import Annotation, AnnotationLayer
|
||||||
from superset.models.dashboard import Dashboard
|
from superset.models.dashboard import Dashboard
|
||||||
|
@ -1455,8 +1455,6 @@ class TestCore(SupersetTestCase):
|
||||||
"""
|
"""
|
||||||
Functions in feature flags don't break bootstrap data serialization.
|
Functions in feature flags don't break bootstrap data serialization.
|
||||||
"""
|
"""
|
||||||
# feature flags are cached
|
|
||||||
cache_manager.cache.clear()
|
|
||||||
self.login()
|
self.login()
|
||||||
|
|
||||||
encoded = json.dumps(
|
encoded = json.dumps(
|
||||||
|
|
Loading…
Reference in New Issue