nsICacheService
| IID: | 98dd0187-aad4-4cab-82c5-1adddef3629d |
| Inherits From: | nsISupports |
This interface is intended to be used as a service. To create an object implementing this interface:
var obj = Components.classes["@mozilla.org/network/cache-service;1"].
getService(Components.interfaces.nsICacheService);This interface is implemented by the following components:
Methods
nsICacheSession createSession ( char* clientID , nsCacheStoragePolicy storagePolicy , PRBool streamBased )
ACString createTemporaryClientID ( nsCacheStoragePolicy storagePolicy )
void evictEntries ( nsCacheStoragePolicy storagePolicy )
void visitEntries ( nsICacheVisitor visitor )
nsICacheSession createSession ( char* clientID , nsCacheStoragePolicy storagePolicy , PRBool streamBased )
Create 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.
- Arguments:
- clientID: - Specifies the name of the client using the cache.
- storagePolicy: - Limits the storage policy for all entries accessed via the returned session. As a result, devices excluded by the storage policy will not be searched when opening entries from the returned session.
- streamBased: - Indicates whether or not the data being cached can be represented as a stream. The 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:
- new cache session.
ACString createTemporaryClientID ( nsCacheStoragePolicy storagePolicy )
Return 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().
- Arguments:
- storagePolicy
void evictEntries ( nsCacheStoragePolicy storagePolicy )
Evicts all entries in all devices implied by the storage policy.
- Arguments:
- storagePolicy
void visitEntries ( nsICacheVisitor visitor )
Visit entries stored in the cache. Used to implement about:cache.
- Arguments:
- visitor
Reference documentation is generated from Mozilla's source.
