@digitalocean/dots - v1.0.1
    Preparing search index...

    Builds and executes requests for operations under /v2/cdn/endpoints/{cdn_id}/cache

    interface CacheRequestBuilder {
        delete(
            body: Purge_cache,
            requestConfiguration?: RequestConfiguration<object>,
        ): Promise<void>;
        toDeleteRequestInformation(
            body: Purge_cache,
            requestConfiguration?: RequestConfiguration<object>,
        ): RequestInformation;
        withUrl(rawUrl: string): CacheRequestBuilder;
    }

    Hierarchy

    Index

    Methods

    • To purge cached content from a CDN endpoint, send a DELETE request to/v2/cdn/endpoints/$ENDPOINT_ID/cache. The body of the request should includea files attribute containing a list of cached file paths to be purged. Apath may be for a single file or may contain a wildcard (*) to recursivelypurge all files under a directory. When only a wildcard is provided, all cached files will be purged. There is a rate limit of 50 files per 20 seconds that can be purged. CDN endpoints have a rate limit of 5 requests per 10 seconds. Purging files using a wildcard path counts as a single request against the API's rate limit. Two identical purge requests cannot be sent at the same time.

      Parameters

      • body: Purge_cache

        The request body

      • OptionalrequestConfiguration: RequestConfiguration<object>

        Configuration for the request such as headers, query parameters, and middleware options.

      Returns Promise<void>

      error when the service returns a 401 status code

      error when the service returns a 404 status code

      error when the service returns a 429 status code

      error when the service returns a 500 status code

      error when the service returns a 4XX or 5XX status code

    • To purge cached content from a CDN endpoint, send a DELETE request to/v2/cdn/endpoints/$ENDPOINT_ID/cache. The body of the request should includea files attribute containing a list of cached file paths to be purged. Apath may be for a single file or may contain a wildcard (*) to recursivelypurge all files under a directory. When only a wildcard is provided, all cached files will be purged. There is a rate limit of 50 files per 20 seconds that can be purged. CDN endpoints have a rate limit of 5 requests per 10 seconds. Purging files using a wildcard path counts as a single request against the API's rate limit. Two identical purge requests cannot be sent at the same time.

      Parameters

      • body: Purge_cache

        The request body

      • OptionalrequestConfiguration: RequestConfiguration<object>

        Configuration for the request such as headers, query parameters, and middleware options.

      Returns RequestInformation

    • Parameters

      • rawUrl: string

      Returns CacheRequestBuilder