nsICacheSession

IID:ae9e84b5-3e2d-457e-8fcd-5bbd2a8b832e
Inherits From:nsISupports

Properties

PRBool doomEntriesIfExpired

Expired entries will be doomed or evicted if this attribute is set to true. If false, expired entries will be returned (useful for offline- mode and clients, such as HTTP, that can update the valid lifetime of cached content). This attribute defaults to true.


Methods

void asyncOpenCacheEntry ( ACString key , nsCacheAccessMode accessRequested , nsICacheListener listener ) void evictEntries ( ) PRBool isStorageEnabled ( ) nsICacheEntryDescriptor openCacheEntry ( ACString key , nsCacheAccessMode accessRequested , PRBool blockingMode )

void asyncOpenCacheEntry ( ACString key , nsCacheAccessMode accessRequested , nsICacheListener listener )

Asynchronous cache access. Does not block the calling thread. Instead, the listener will be notified when the descriptor is available.

Arguments:
key
accessRequested
listener

void evictEntries ( )

Evict all entries for this session's clientID according to its storagePolicy.


PRBool isStorageEnabled ( )

Return whether any of the cache devices implied by the session storage policy are currently enabled for instantiation if they don't already exist.


nsICacheEntryDescriptor openCacheEntry ( ACString key , nsCacheAccessMode accessRequested , PRBool blockingMode )

Synchronous cache access. This returns a unique descriptor each time it is called, even if the same key is specified. When called by multiple threads for write access, only one writable descriptor will be granted. If 'blockingMode' is set to false, it will return NS_ERROR_CACHE_WAIT_FOR_VALIDATION rather than block when another descriptor has been given WRITE access but hasn't validated the entry yet.

Arguments:
key
accessRequested
blockingMode

References

This interface is the type of the following properties:

nsIImapService.cacheSession, nsIMsgMailNewsUrl.imageCacheSession, nsINntpService.cacheSession

This interface is returned from the following methods:

nsICacheService.createSession

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com