Method: projects.locations.edgeCacheServices.invalidateCache

Sends a cache invalidation request.

HTTP request

POST https://networkservices.googleapis.com/v1alpha1/{edgeCacheService=projects/*/locations/*/edgeCacheServices/*}:invalidateCache

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
edgeCacheService

string

Required. The name of the EdgeCacheService resource to apply the invalidation request to. Must be in the format projects/*/locations/global/edgeCacheServices/*.

Authorization requires the following IAM permission on the specified resource edgeCacheService:

  • networkservices.edgeCacheServices.invalidateCache

Request body

The request body contains data with the following structure:

JSON representation
{
  "host": string,
  "path": string,
  "cacheTags": [
    string
  ]
}
Fields
host

string

The hostname to invalidate against. You can specify an exact or wildcard host based on the host component. For example, video.example.com or *.example.com.

path

string

The path to invalidate against. You can specify an exact or wildcard path based on the a path component. For example, /videos/hls/139123.mp4 or /manifests/*.

cacheTags[]

string

A list of cache tags used to identify cached objects.

Cache tags are specified when the response is first cached, by setting the Cache-Tag response header at the origin.

By default, all objects have a cache tag representing the HTTP status code of the response, the MIME content-type, and the origin.

Multiple cache tags in the same revalidation request are treated as Boolean OR - for example, tag1 OR tag2 OR tag3.

If a host and path are also specified, these are treated as Boolean AND with any tags.

Up to 10 tags can be specified in a single invalidation request.

Response body

If successful, the response body is empty.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.