Logos DX
    Preparing search index...

    The Cache interface provides a persistent storage mechanism for Request / Response object pairs that are cached in long lived memory. Available only in secure contexts.

    MDN Reference

    interface Cache {
        add(request: URL | RequestInfo): Promise<void>;
        addAll(requests: RequestInfo[]): Promise<void>;
        delete(
            request: URL | RequestInfo,
            options?: CacheQueryOptions,
        ): Promise<boolean>;
        keys(
            request?: URL | RequestInfo,
            options?: CacheQueryOptions,
        ): Promise<readonly Request[]>;
        match(
            request: URL | RequestInfo,
            options?: CacheQueryOptions,
        ): Promise<Response | undefined>;
        matchAll(
            request?: URL | RequestInfo,
            options?: CacheQueryOptions,
        ): Promise<readonly Response[]>;
        put(request: URL | RequestInfo, response: Response): Promise<void>;
    }
    Index

    Methods

    • The addAll() method of the Cache interface takes an array of URLs, retrieves them, and adds the resulting response objects to the given cache.

      MDN Reference

      Parameters

      Returns Promise<void>