Skip to content

Commit

Permalink
fix: Use cache_manager.cache rather than cache_manager.data_cache for…
Browse files Browse the repository at this point in the history
… caching table metadata (#20726)
  • Loading branch information
john-bodley authored Jul 25, 2022
1 parent 7a1aa79 commit 8bfc9b7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions superset/models/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ def inspector(self) -> Inspector:

@cache_util.memoized_func(
key="db:{self.id}:schema:None:table_list",
cache=cache_manager.data_cache,
cache=cache_manager.cache,
)
def get_all_table_names_in_database( # pylint: disable=unused-argument
self,
Expand All @@ -531,7 +531,7 @@ def get_all_table_names_in_database( # pylint: disable=unused-argument

@cache_util.memoized_func(
key="db:{self.id}:schema:None:view_list",
cache=cache_manager.data_cache,
cache=cache_manager.cache,
)
def get_all_view_names_in_database( # pylint: disable=unused-argument
self,
Expand All @@ -551,7 +551,7 @@ def get_all_view_names_in_database( # pylint: disable=unused-argument

@cache_util.memoized_func(
key="db:{self.id}:schema:{schema}:table_list",
cache=cache_manager.data_cache,
cache=cache_manager.cache,
)
def get_all_table_names_in_schema( # pylint: disable=unused-argument
self,
Expand Down Expand Up @@ -582,7 +582,7 @@ def get_all_table_names_in_schema( # pylint: disable=unused-argument

@cache_util.memoized_func(
key="db:{self.id}:schema:{schema}:view_list",
cache=cache_manager.data_cache,
cache=cache_manager.cache,
)
def get_all_view_names_in_schema( # pylint: disable=unused-argument
self,
Expand Down Expand Up @@ -613,7 +613,7 @@ def get_all_view_names_in_schema( # pylint: disable=unused-argument

@cache_util.memoized_func(
key="db:{self.id}:schema_list",
cache=cache_manager.data_cache,
cache=cache_manager.cache,
)
def get_all_schema_names( # pylint: disable=unused-argument
self,
Expand Down

0 comments on commit 8bfc9b7

Please sign in to comment.