From 3d898a94f3a0d53fedf3ec95962e707e0323afee Mon Sep 17 00:00:00 2001 From: Gavin Reynolds Date: Fri, 12 Jul 2024 10:03:29 +0100 Subject: [PATCH] Clear Local Cache should *really* clear local storage and session storage entirely Signed-off-by: Gavin Reynolds --- src/redux/settings/sagas.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/redux/settings/sagas.js b/src/redux/settings/sagas.js index 1c548490..a95f0bd7 100644 --- a/src/redux/settings/sagas.js +++ b/src/redux/settings/sagas.js @@ -252,8 +252,11 @@ export function* clearLocalCacheImpl() { yield put({ type: 'RESET', }); - yield persistor.purge(); + yield persistor.pause(); + yield persistor.flush().then(() => persistor.purge()); yield persistor.persist(); + localStorage.clear(); + sessionStorage.clear(); yield put({ type: CLEAR_LOCAL_CACHE_COMPLETED, });