Skip to content

Commit 04ac632

Browse files
only21milclaude
andcommitted
fix(desktop): clear Cache Storage when deleting browser profile data
Clearing a profile's cookies already removed local storage, IndexedDB and service workers, but left the page's Cache API store behind. Electron's clearCache() only empties the HTTP cache, so "Clear data" and profile removal kept Cache Storage entries in the profile's partition. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 54983e3 commit 04ac632

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎apps/desktop/src/preview/BrowserSession.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ describe("BrowserSession", () => {
340340
assert.strictEqual(browserSession.clearStorageData.mock.calls.length, 1);
341341
assert.deepEqual(browserSession.clearStorageData.mock.calls[0], [
342342
{
343-
storages: ["cookies", "localstorage", "indexdb", "serviceworkers"],
343+
storages: ["cookies", "localstorage", "indexdb", "serviceworkers", "cachestorage"],
344344
},
345345
]);
346346
assert.strictEqual(browserSession.clearCache.mock.calls.length, 1);

‎apps/desktop/src/preview/BrowserSession.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ export const make = Effect.gen(function* BrowserSessionMake() {
325325
Effect.tryPromise({
326326
try: () =>
327327
browserSession.clearStorageData({
328-
storages: ["cookies", "localstorage", "indexdb", "serviceworkers"],
328+
storages: ["cookies", "localstorage", "indexdb", "serviceworkers", "cachestorage"],
329329
}),
330330
catch: (cause) =>
331331
new BrowserSessionStorageClearError({

0 commit comments

Comments
 (0)