开发者

Adding entry to Firefox cache from an XPCOM component

开发者 https://www.devze.com 2022-12-12 17:23 出处:网络
The nsICacheSession has a method openCacheEntry() which returns an existing cache entry. Is there a method such as createCacheEntry() that will create a cach开发者_开发知识库e entry. I want to create

The nsICacheSession has a method openCacheEntry() which returns an existing cache entry. Is there a method such as createCacheEntry() that will create a cach开发者_开发知识库e entry. I want to create an XPCOM object that will read files from disk and write them to Firefox cache.

Thanks


As stated in MDC nsICache interface reference opening an entry with ACCESS_WRITE will create the entry if it doesn't already exist (if it already exists, the entry will be doomed so you can replace it with a new one).

Perhaps a little too late for the original poster, but this can be useful for other people out there.

0

精彩评论

暂无评论...
验证码 换一张
取 消