Open Bug 792248 Opened 12 years ago Updated 2 years ago

Setting the browser.cache.disk.capacity manually doesn't take effect because of smart sizing

Categories

(Core :: Networking, defect, P5)

17 Branch
All
Android
defect

Tracking

()

People

(Reporter: kats, Unassigned)

Details

(Whiteboard: [necko-would-take])

STR:
1. Start fennec (fresh install with no pre-existing profile)
2. Load some site (e.g. cnn.com)
3. Load about:config
4. Change the value of browser.cache.disk.capacity to something small (e.g. 2048)
5. Continue browsing for a while
6. Go to about:cache (or do a "du -sh ." in your Cache directory on the device) to see how much space the disk cache is using

Expected results:
Disk cache should be using no more than the specified value (e.g. 2048 KiB) +/- some rounding fuzz

Actual results:
Disk cache usage far exceeds the specified value. If I turn off smart sizing by setting the browser.cache.disk.smart_size.enabled pref to false and then re-set the browser.cache.disk.capacity value, it does take effect. I think it would be better if manually setting the disk cache size turned off smart sizing (at least in the case where the disk cache size is adjusted downwards) since the user is clearly trying to take control of this value.

[1] http://mxr.mozilla.org/mozilla-central/source/netwerk/cache/nsCacheService.cpp#422
Whiteboard: [necko-would-take]
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: -- → P5

Related issue: On about:cache page, Maximum storage size field for disk includes memory cache. See https://bugzilla.mozilla.org/show_bug.cgi?id=1027944 for explanation.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.