Interface imgICacheType

imgICache interface

Author

Stuart Parmenter pavlov@netscape.com

Version

0.1

See

imagelib2

Hierarchy

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Evict images from the cache.

    Parameters

    • chrome: boolean

      If TRUE, evict only chrome images. If FALSE, evict everything except chrome images.

    Returns void

  • Clear the image cache for a document. Controlled documents are responsible for doing this manually when they get destroyed.

    Parameters

    • doc: Document

    Returns void

  • Find Properties Used to get properties such as 'type' and 'content-disposition' 'type' is a nsISupportsCString containing the images' mime type such as 'image/png' 'content-disposition' will be a nsISupportsCString containing the header If you call this before any data has been loaded from a URI, it will succeed, but come back empty.

    Hopefully this will be removed with bug 805119

    Returns

    NULL if the URL was not found in the cache

    Parameters

    • uri: nsIURI

      The URI to look up.

    • doc: Document

      Optional pointer to the document that the cache entry belongs to.

    Returns nsIProperties

  • Evict images from the non-chrome cache which match the the given base domain. Matching cache entries will be cleared across all origin attributes and all processes.

    Throws

    NS_ERROR_NOT_AVAILABLE if not called in the parent process.

    Parameters

    • aBaseDomain: string

      base domain to delete cache entries for.

    Returns void

  • Evict images from the cache with the same origin and the same originAttributes of the passed principal, across all processes. May only be called from the parent process.

    Throws

    NS_ERROR_NOT_AVAILABLE if not called in the parent process.

    Parameters

    • aPrincipal: nsIPrincipal

      The principal to clear cache entries for. The principals origin attributes are used to determine whether the private or normal browsing cache is cleared.

    Returns void

  • Evict images from the cache.

    Throws

    NS_ERROR_NOT_AVAILABLE if \a uri was unable to be removed from the cache.

    Parameters

    • uri: nsIURI

      The URI to remove.

    • doc: Document

      The document to remove the cache entry for.

    Returns void

  • Make this cache instance respect private browsing notifications. This entails clearing the chrome and content caches whenever the last-pb-context-exited notification is observed.

    Returns void

Generated using TypeDoc