nsISupports
Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)This interface is no longer supported and planned to be removed soon: use nsICacheStorageService instead. At the time of writing there is no documentation for nsICacheStorageService but comments are available in the source.
Note: Starting in Gecko 2.0, cache I/O is handled asynchronously.
nsICacheSession createSession(in string clientID, in nsCacheStoragePolicy storagePolicy, in boolean streamBased); |
ACString createTemporaryClientID(in nsCacheStoragePolicy storagePolicy); Obsolete since Gecko 1.9.2 |
void evictEntries(in nsCacheStoragePolicy storagePolicy); |
void init(); Obsolete since Gecko 1.8 |
void shutdown(); Obsolete since Gecko 1.8 |
void visitEntries(in nsICacheVisitor visitor); |
Attribute | Type | Description |
cacheIOTarget |
nsIEventTarget |
The event target for cache I/O operation notifications. Read only. |
This method creates a cache session.
A cache session represents a client's access into the cache. The cache session is not "owned" by the cache service. Hence, it is possible to create duplicate cache sessions. Entries created by a cache session are invisible to other cache sessions, unless the cache sessions are equivalent.
nsICacheSession createSession( in string clientID, in nsCacheStoragePolicy storagePolicy, in boolean streamBased );
clientID
storagePolicy
streamBased
storagePolicy
must be consistent with the value of this field. For example, a non-stream-based cache entry can only have a storage policy of STORE_IN_MEMORY
.Returns a new cache session.
Deprecated
This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
Obsolete since Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
This method creates and returns a unique, temporary cache client ID.
This is used by the offline cache. The offline cache lets clients accumulate entries in a temporary client and merge them in as a group using nsIOfflineCacheSession.mergeTemporaryClient()
.
ACString createTemporaryClientID( in nsCacheStoragePolicy storagePolicy );
storagePolicy
Returns a newly created unique, temporary cache client ID.
NS_ERROR_NOT_IMPLEMENTED
This method evicts all entries in all devices implied by the storage policy.
void evictEntries( in nsCacheStoragePolicy storagePolicy );
storagePolicy
Initialize the cache service.
void init();
None.
Missing Exception
Shutdown()
the cache service.
void shutdown();
None.
This method visits entries stored in the cache. Used to implement the about:cache
URI.
void visitEntries( in nsICacheVisitor visitor );
visitor