rusackas opened a new pull request, #41303:
URL: https://github.com/apache/superset/pull/41303
### SUMMARY
GET responses carrying an `ETag` were persisted into the
`@SUPERSET-UI/CONNECTION` Cache API namespace and retained across sessions,
with no purge on logout.
The logout handler in `RightMenu` already cleared the persisted redux
`localStorage` (which holds SQL Lab editor/results state) and session storage.
This extends it to also delete the namespaced Cache API store, so cached GET
responses are not retained on the device after the session ends. The deletion
is best-effort (the promise is not awaited, since logout immediately navigates
away) and uses the exported `CACHE_KEY` constant.
This completes the on-logout client-state clearing: `localStorage['redux']`
(already cleared), session storage (already cleared), and now the Cache API
namespace.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A — client-side cleanup behavior.
### TESTING INSTRUCTIONS
The existing `RightMenu` logout test is extended to mock the Cache API and
assert `caches.delete('@SUPERSET-UI/CONNECTION')` is called on logout
(alongside the existing localStorage/sessionStorage assertions).
Run: `cd superset-frontend && npm run test --
src/features/home/RightMenu.test.tsx`
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [x] Changes UI
- [ ] Includes DB Migration (follow approval process in
[SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
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]