rusackas commented on code in PR #41303:
URL: https://github.com/apache/superset/pull/41303#discussion_r3456965641


##########
superset-frontend/src/features/home/RightMenu.tsx:
##########
@@ -353,6 +354,14 @@ const RightMenu = ({
     try {
       window.localStorage.removeItem('redux');
       window.sessionStorage.removeItem('login_attempted');
+      // Purge the namespaced Cache API store so cached GET responses are not
+      // retained on the device after the session ends. Best-effort: the
+      // returned promise is not awaited since logout navigates away.
+      if (typeof caches !== 'undefined') {
+        caches.delete(CACHE_KEY).catch(() => {
+          /* best-effort: ignore cache deletion failures */
+        });
+      }

Review Comment:
   This is intentionally best-effort — awaiting would mean swallowing the link 
nav with `preventDefault` and only redirecting once `caches.delete` settles, 
which risks stalling logout if the op hangs. The browser keeps the request 
alive briefly on unload, and the store is namespaced per-origin so a new 
session re-keys anyway. Comfortable leaving it fire-and-forget.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to