Re: How to invalidate entries in the cache

2006-05-13 Thread Michel Gutierrez
Christian Biesinger wrote: Hm... this is definitely working for other code, such as http://lxr.mozilla.org/seamonkey/source/browser/base/content/metaData.js#61, so I'm not sure why it doesn't for you. Looks like I am doing the same stuff than the code you mention. I'm running this on firefox 1

Re: How to invalidate entries in the cache

2006-05-13 Thread Christian Biesinger
Michel Gutierrez wrote: For calling createSession, I am using "HTTP" as client ID. This is what is given to the cache visitor in entryInfo.clientID. The storage policy is Components.interfaces.nsICache.STORE_ANYWHERE. Hm... this is definitely working for other code, such as http://lxr.mozilla

Re: How to invalidate entries in the cache

2006-05-12 Thread Michel Gutierrez
Thanks to Christian, we now know the error is NS_ERROR_CACHE_KEY_NOT_FOUND. As I am pretty sure I am using the right key, I presume creating my own cache session to obtain the entry descriptors is not the way to go. It is definitely possible. What are you using as the client ID for createSessi

Re: How to invalidate entries in the cache

2006-05-12 Thread Christian Biesinger
Michel Gutierrez wrote: Thanks to Christian, we now know the error is NS_ERROR_CACHE_KEY_NOT_FOUND. As I am pretty sure I am using the right key, I presume creating my own cache session to obtain the entry descriptors is not the way to go. It is definitely possible. What are you using as the c

Re: How to invalidate entries in the cache

2006-05-12 Thread Michel Gutierrez
Thanks to Christian, we now know the error is NS_ERROR_CACHE_KEY_NOT_FOUND. As I am pretty sure I am using the right key, I presume creating my own cache session to obtain the entry descriptors is not the way to go. As I don't have a way to obtain the cache session used by HTTP, I think what

Re: How to invalidate entries in the cache

2006-05-11 Thread Michel Gutierrez
Christian Biesinger wrote: That error is NS_ERROR_CACHE_KEY_NOT_FOUND. Try http://silver.warwickcompsoc.co.uk/~silver/mozilla/misc/nserror - unfortunately XPConnect knows very few error codes, so its error messages aren't always helpful. Thank you Christian. This is definitely an address to

Re: How to invalidate entries in the cache

2006-05-11 Thread Christian Biesinger
Michel Gutierrez wrote: [Exception... "Component returned failure code: 0x804b003d [nsICacheSession.openCacheEntry]" nsresult: "0x804b003d ()" location: "JS frame :: chrome://victor/content/vutil.js :: anonymous :: line 1542" data: no] That error is NS_ERROR_CACHE_KEY_NOT_FOUND. Try http:/

Re: How to invalidate entries in the cache

2006-05-11 Thread Michel Gutierrez
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 ()" location: "JS frame :: chrome://victor/content/vutil.js :: a

Re: How to invalidate entries in the cache

2006-05-11 Thread Darin Fisher
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. -Darin On 5/11/06, Michel Gutierrez <[EMAIL PROTECTED]> wrote

How to invalidate entries in the cache

2006-05-11 Thread Michel Gutierrez
Hi all, 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 nsICa