Bug 1848542 - Do a cache cleanup when cache purging is enabled r=necko-reviewers...
commitce931ebd84f42517b1645b7c4d4ca7f73b8ede5b
authorValentin Gosu <valentin.gosu@gmail.com>
Tue, 21 Nov 2023 17:29:08 +0000 (21 17:29 +0000)
committerValentin Gosu <valentin.gosu@gmail.com>
Tue, 21 Nov 2023 17:29:08 +0000 (21 17:29 +0000)
tree2c5b1bd9c952cf8ff4d31520a3f61fd312358fbe
parent2d19b00f2412f229aafce7e4e5487ad9bf2e1376
Bug 1848542 - Do a cache cleanup when cache purging is enabled r=necko-reviewers,kershaw

It seems that sometimes the cache purge task may fail to remove the
cache folder. When that happens, we might end up with multiple cache
folders in the profile folder. Since the task is unable to remove it,
we should remove the folders on a background thread (check once a day)

Differential Revision: https://phabricator.services.mozilla.com/D194051
netwerk/cache2/CacheFileIOManager.cpp
netwerk/cache2/CacheFileIOManager.h
netwerk/cache2/CacheObserver.cpp
netwerk/test/browser/browser.toml
netwerk/test/browser/browser_purgeCache_idle_daily.js [new file with mode: 0644]