clearing memory cache does not reset "entry count" or "storage in use" as shown in about:cache?device=memory steps: visit some websites. clear cache. load about:cache. notice incorrect results. build id: 2003-01-29-08 trunk linux
ooh, good catch darin. I see this too. I tried in an old build (1/24/03, i.e before my checkin to cache panel to add pre-fetching pref) and I can duplicate in that build too.
this should be fixed for 1.3 final if possible. i suspect this might break our eviction policy... possibly making the memory cache appear to have less available space.
I'm not sure what's the correct behaviour here, but I did looked around the cache code to see what's going on. The function EvictEntries removes the cache entries that are not used, i.e I found there are certain entries that are used by mozilla like chrome images. These are not removed while clearing the memory cache. So obviously, "entry count" and "storage in use" are not completely reset to 0.
When we clear the memory cache we should be clearing chrome as well. Any chrome we need will get recached pretty quickly. There is definitely a bug with the count and storage accounting. It shouldn't be hard to track down and fix for 1.3 final.
Status: NEW → ASSIGNED
A patch was just submitted for bug 198267 that addresses this problem. Historically, we've included 'doomed' entries when accounting for size and entries in the memory cache. However, the memory cache doesn't have access to the list of doomed entries (it's kept by the cache service), so without adding an additional data structure to keep a duplicate list of doomed memory cache entries, there is no way for the memory cache to display them in about:cache. I think it makes more sense to consider doomed entries as evicted. The "ownership" of doomed entries belongs to the client.
Priority: -- → P2
Target Milestone: --- → mozilla1.4alpha
Patch checked in. Marking FIXED.
Status: ASSIGNED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.