clearing memory cache does not reset "entry count" or "storage in use"

RESOLVED FIXED in mozilla1.4alpha

Status

()

Core
Networking: Cache
P2
normal
RESOLVED FIXED
15 years ago
15 years ago

People

(Reporter: Darin Fisher, Assigned: gordon)

Tracking

Trunk
mozilla1.4alpha
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

15 years ago
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
(Reporter)

Comment 1

15 years ago
Created attachment 113003 [details]
screenshot

screenshot after emptying cache.

Comment 2

15 years ago
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. 
(Reporter)

Comment 3

15 years ago
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.
Keywords: nsbeta1

Comment 4

15 years ago
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.
(Assignee)

Comment 5

15 years ago
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
(Assignee)

Comment 6

15 years ago
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
(Assignee)

Comment 7

15 years ago
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.