Thank you Darin.
I have tried that already and I get an exception while calling
nsICacheSession.openCacheEntry:
[Exception... "Component returned failure code: 0x804b003d
[nsICacheSession.openCacheEntry]" nsresult: "0x804b003d (<unknown>)"
location: "JS frame :: chrome://victor/content/vutil.js :: anonymous ::
line 1542" data: no]
That's not very explicit, at least to me.
Any idea ?
/mig
Darin Fisher wrote:
Try opening the cache entry after the visitor completes. You cannot
open cache entries while visiting the cache. Save a list of entries
keys (and cache client IDs) that you wish to doom, and then doom them
after you finish visiting.
From my chrome application, I need to invalidate some cache entries of
HTML files, in order to make those pages be reloaded next time they are
displayed.
I use my own instance of nsICacheVisitor to walk through cached entries,
and I can locate the desired entries. However, the nsICacheVisitor API
only provides me with a nsICacheEntryInfo interface, while the method to
invalidate the entry is located in the nsICacheEntryDescriptor interface.
The only way I see to get an instance of nsICacheEntryDescriptor is to
use a method from interface nsICacheSession, openCacheEntry or
asyncOpenCacheEntry. Is there a "global" cache session I can get
somewhere ?
If I create my own cache session with the createSession method of
@mozilla.org/network/cache-service;1, and use it to call openCacheEntry
or asyncOpenCacheEntry from my nsICacheVisitor instance, firefox enters
into some kind of deadlock and freezes.
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom