From 347c1740998bba767ce05a42a969f1fb295d1479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20H=C3=B6xtermann?= Date: Sat, 12 Apr 2025 21:15:08 +0200 Subject: [PATCH] fix(thumbnails): ensure consistent cache_key (#33109) --- superset/dashboards/api.py | 1 + superset/tasks/thumbnails.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/superset/dashboards/api.py b/superset/dashboards/api.py index 152a8dc421c..cd17cda16b5 100644 --- a/superset/dashboards/api.py +++ b/superset/dashboards/api.py @@ -1307,6 +1307,7 @@ class DashboardRestApi(BaseSupersetModelRestApi): current_user=current_user, dashboard_id=dashboard.id, force=False, + cache_key=cache_key, ) return self.response( 202, diff --git a/superset/tasks/thumbnails.py b/superset/tasks/thumbnails.py index 8f859725076..5c3e2e412dc 100644 --- a/superset/tasks/thumbnails.py +++ b/superset/tasks/thumbnails.py @@ -78,6 +78,7 @@ def cache_dashboard_thumbnail( force: bool, thumb_size: Optional[WindowSize] = None, window_size: Optional[WindowSize] = None, + cache_key: str | None = None, ) -> None: # pylint: disable=import-outside-toplevel from superset.models.dashboard import Dashboard @@ -103,6 +104,7 @@ def cache_dashboard_thumbnail( window_size=window_size, thumb_size=thumb_size, force=force, + cache_key=cache_key, )