Closed
Bug 964898
Opened 11 years ago
Closed 11 years ago
HTTP cache v2: delete cache2 dir after the pref switch
Categories
(Core :: Networking: Cache, defect)
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: mayhemer, Assigned: mayhemer)
References
Details
Attachments
(1 file)
11.09 KB,
patch
|
jduell.mcbugs
:
review+
mayhemer
:
checkin+
|
Details | Diff | Splinter Review |
I think we can use an internal function of the new cache service to just delete the stuff some 1 minute after start up while the pref is at "use old cache".
Easy patch to build.
![]() |
Assignee | |
Comment 1•11 years ago
|
||
Jason, what do you think about the following way to do the deletion:
- there is a new pref "browser.cache.auto_delete_cache_version"
- at -1 it does nothing
- at 0 it deletes the old cache (Cache) when user is on the new cache, otherwise does nothing
- at 1 it deletes the cache2 dir when user is using the old cache, otherwise does nothing
This patch actually prepares land to also delete the old cache when we fully switch to cache2 once. And the auto-deletion may be easily turned off for e.g. development purposes.
Assignee: nobody → honzab.moz
Status: NEW → ASSIGNED
Attachment #8367089 -
Flags: feedback?(jduell.mcbugs)
Comment 2•11 years ago
|
||
Comment on attachment 8367089 [details] [diff] [review]
v1
Review of attachment 8367089 [details] [diff] [review]:
-----------------------------------------------------------------
Looks ready to land with a couple nits fixed. No need to re-review if you agree with them.
::: netwerk/cache/nsCacheService.h
@@ +126,5 @@
> static int32_t CacheCompressionLevel();
>
> static bool GetClearingEntries();
>
> + static void DiskCacheDirectory(nsIFile ** result);
"GetDiskCacheDirectory"? I'm used to this kind of method having a "Get" prefix. No big deal--your call.
::: netwerk/cache2/CacheFileIOManager.h
@@ +223,5 @@
>
> static nsresult EnumerateEntryFiles(EEnumerateMode aMode,
> CacheEntriesEnumerator** aEnumerator);
>
> + static void CacheDirectory(nsIFile** result);
Also GetCacheDirectory?
::: netwerk/cache2/CacheObserver.cpp
@@ +122,5 @@
> break;
> }
> }
>
> +void CacheObserver::SchduleAutoDelete()
typo: "Schedule"
Attachment #8367089 -
Flags: feedback?(jduell.mcbugs) → review+
![]() |
Assignee | |
Comment 3•11 years ago
|
||
Comment on attachment 8367089 [details] [diff] [review]
v1
https://hg.mozilla.org/integration/mozilla-inbound/rev/955e0211df10
Attachment #8367089 -
Flags: checkin+
Comment 4•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in
before you can comment on or make changes to this bug.
Description
•