Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions superset/models/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ def data(self) -> Dict[str, Any]:
}

@cache.memoize(
# manually maintain cache key version
make_name=lambda fname: f"{fname}-v1",
# manage cache version manually
make_name=lambda fname: f"{fname}-v2",
timeout=config["DASHBOARD_CACHE_TIMEOUT"],
unless=lambda: not is_feature_enabled("DASHBOARD_CACHE"),
)
Expand Down Expand Up @@ -294,7 +294,7 @@ def update_thumbnail(self) -> None:

@debounce(0.1)
def clear_cache(self) -> None:
cache.delete_memoized(self.full_data)
Copy link
Member Author

@ktmud ktmud Oct 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original code only updates the hash version related to the function: https://github.com/sh4nks/flask-caching/blob/v1.9.0/flask_caching/__init__.py#L1051-L1052

cache.delete_memoized(Dashboard.full_data, self)

@classmethod
@debounce(0.1)
Expand Down