Interface nsICacheStorageServiceType

Provides access to particual cache storages of the network URI cache.

Hierarchy

Properties

ioTarget: nsIEventTarget

I/O thread target to use for any operations on disk

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

  • Asynchronously determine how many bytes of the disk space the cache takes.

    See

    nsICacheStorageConsumptionObserver

    Parameters

    • aObserver: nsICacheStorageConsumptionObserver

      A mandatory (weak referred) observer. Documented at nsICacheStorageConsumptionObserver. NOTE: the observer MUST implement nsISupportsWeakReference.

    Returns void

  • Asynchronously visits all storages of the disk cache and memory cache.

    See

    nsICacheStorageVisitor

    Parameters

    • aVisitor: nsICacheStorageVisitor

      A visitor callback.

    • aVisitEntries: boolean

      A boolean indicates whether visits entries.

    Returns void

  • Evict the whole cache.

    Returns void

  • Evict any cache entry which belongs to a base domain. This includes entries partitioned under aBaseDomain and entries which belong to aBaseDomain, but are partitioned under other top level sites.

    Parameters

    • aBaseDomain: string

      The base domain to clear cache for.

    Returns void

  • Evict any cache entry having the same origin of aPrincipal.

    Parameters

    • aPrincipal: nsIPrincipal

      The principal to compare the entries with.

    Returns void

  • Evict any cache entry having the same originAttributes.

    Parameters

    • aOriginAttributes: string

      The origin attributes in string format to compare the entries with.

    Returns void

  • Get storage where entries will be written to disk when not forbidden by response headers.

    Parameters

    • aLoadContextInfo: nsILoadContextInfo

    Returns nsICacheStorage

  • Get storage where entries will only remain in memory, never written to the disk.

    NOTE: Any existing disk entry for [URL|id-extension] will be doomed prior opening an entry using this memory-only storage. Result of AsyncOpenURI will be a new and empty memory-only entry. Using OPEN_READONLY open flag has no effect on this behavior.

    Parameters

    • aLoadContextInfo: nsILoadContextInfo

      Information about the loading context, this focuses the storage JAR and respects separate storage for private browsing.

    Returns nsICacheStorage

  • Get storage where entries will be written to disk and marked as pinned. These pinned entries are immune to over limit eviction and call of clear() on this service.

    Parameters

    • aLoadContextInfo: nsILoadContextInfo

    Returns nsICacheStorage

  • Purges data we keep warmed in memory. Use for tests and for saving memory.

    Parameters

    • aWhat: uint32_t

    Returns void

Generated using TypeDoc