Closed Bug 74668 Opened 25 years ago Closed 24 years ago

[rfe] Provide a way to determine what cache device a given nsICacheEntryDescriptor is talking about

Categories

(Core :: Networking: Cache, enhancement)

enhancement
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla0.9.1

People

(Reporter: db48x, Assigned: gordon)

References

Details

(Whiteboard: [cache])

Attachments

(1 file)

The old cache had a property that was a reference back to the actual cache object. Dunno yet how that translates over to the new cache architecture, but similar I need similar functionalilty. I'm using this information for the page info window, where it is desireable it be able to tell if whether a given document is cached, where it's cached and where it's stored (path to a file for the disk cache, for example). I could get this information by getting an nsICacheVisitor and iterating through all the cached objects looking for the one in question, but that seems a tad bit inefficient.
Keywords: 4xp
Summary: Provide a way to determine what device a given nsICacheEntryDescriptor is talking about → [rfe] Provide a way to determine what cache device a given nsICacheEntryDescriptor is talking about
Whiteboard: [cache]
I'm not so sure we want to maintain this functionality in precisely the same way. I think reporting the storage policy that the entry is stored with will less problematic. Entries in the disk cache may not be stored in a separate file soon, unless they are explicitly requested (reducing performance). Also in the future, we would like to be able to migrate entries, or duplicate entries between disk and memory caches. We also may be moving to a model where all objects for the current page are cached, so it may not make any sense to report that a page is cached (http:// will be cached, file:// won't be). Darin? Patrick? Other comments?
Agreed. There isn't much point in rewriting something if you're going to keep doing everything the same old way. At minimum I'd like to be able to show which cache an object is in (currently a choice between Disk and Memory, it looks like). That should be easy enough to show by just mentioning which storage policy was acutally used, as you say. The other stuff is just there because it's shown in ns4.7x and IE, so surely we must do the same thing. Sounds like a plan to me.
Actually, the storage policy indicates which caches COULD be used, not necessarily which cache is currently used. It may be important to a user to know that a particular entry won't be allowed in the disk cache, for example. If we REALLY NEED to learn the device from the descriptor, we could add a read- only attribute.
Blocks: 52730
Okay, Darin convinced me. We will add deviceID as a read-only attribute on nsICacheEntryInfo.
Target Milestone: --- → mozilla0.9
Target Milestone: mozilla0.9 → mozilla0.9.1
looks good r/sr=darin
r=beard
Changes checked in.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
No longer blocks: 52730
[RFE] is deprecated in favor of severity: enhancement. They have the same meaning.
Severity: normal → enhancement
Status: RESOLVED → VERIFIED
QA Contact: tever → cacheqa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: