File: //snap/google-cloud-cli/396/help/man/man1/gcloud_edge-cache_services_invalidate-cache.1
.TH "GCLOUD_EDGE\-CACHE_SERVICES_INVALIDATE\-CACHE" 1
.SH "NAME"
.HP
gcloud edge\-cache services invalidate\-cache \- invalidate the cache for an EdgeCacheService resource
.SH "SYNOPSIS"
.HP
\f5gcloud edge\-cache services invalidate\-cache\fR (\fISERVICE\fR\ :\ \fB\-\-location\fR=\fILOCATION\fR) (\fB\-\-host\fR=\fIHOST\fR\ \fB\-\-path\fR=\fIPATH\fR\ \fB\-\-tags\fR=[\fITAGS\fR,...]) [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
Invalidate the cache entries associated with an EdgeCacheService resource.
.SH "EXAMPLES"
To invalidate content via a tag, or tags for a given host for an
EdgeCacheService named 'my\-service':
.RS 2m
$ gcloud edge\-cache services invalidate\-cache my\-service \e
\-\-tags="status=404" \-\-host="media.example.com"
.RE
To invalidate all content under a specific path, specify an exact path, or a
prefix. Prefixes are denoted with a trailing \f5*\fR character.
.RS 2m
$ gcloud edge\-cache services invalidate\-cache my\-service \e
\-\-path="/static/*"
.RE
You can optionally combine this with a status code. For example, to invalidate
all cached HTTP 404s:
.RS 2m
$ gcloud edge\-cache services invalidate\-cache my\-service \e
\-\-tags="status=404" \-\-path="/static/*"
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
Service resource \- The EdgeCacheService resource you want to invalidate the
cache for. The arguments in this group can be used to specify the attributes of
this resource. (NOTE) Some attributes are not given arguments in this group but
can be set in other ways.
To set the \f5project\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5service\fR on the command line with a fully specified
name;
.IP "\(em" 2m
provide the argument \f5\-\-project\fR on the command line;
.IP "\(em" 2m
set the property \f5core/project\fR.
.RE
.sp
This must be specified.
.RS 2m
.TP 2m
\fISERVICE\fR
ID of the service or fully qualified identifier for the service.
To set the \f5service\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5service\fR on the command line.
.RE
.sp
This positional argument must be specified if any of the other arguments in this
group are specified.
.TP 2m
\fB\-\-location\fR=\fILOCATION\fR
The location Id.
To set the \f5location\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5service\fR on the command line with a fully specified
name;
.IP "\(bu" 2m
provide the argument \f5\-\-location\fR on the command line;
.IP "\(bu" 2m
use global location.
.RE
.sp
.RE
.RE
.sp
.SH "REQUIRED FLAGS"
.RS 2m
.TP 2m
At least one of these must be specified:
.RS 2m
.TP 2m
\fB\-\-host\fR=\fIHOST\fR
The hostname to invalidate against. You can specify an exact or wildcard host \-
e.g. "video.example.com" or "\fB.example.com" \- based on host component.
.TP 2m
\fR\-\-path\fB=\fIPATH\fR
The path to invalidate against. You can specify an exact or wildcard host \-
e.g. "/videos/hls/139123.mp4" or "/manifests/\fR" \- based on path component.
.TP 2m
\fB\-\-tags\fR=[\fITAGS\fR,...]
A list of cache tags used to identify cached objects.
.RS 2m
.IP "\(bu" 2m
Cache tags are specified when the response is first cached, by setting the
"Cache\-Tag" response header at the origin.
.IP "\(bu" 2m
By default, all objects have a cache tag representing the HTTP status code of
the response, the MIME content\-type, and the origin.
.IP "\(bu" 2m
Multiple cache tags in the same revalidation request are treated as boolean OR
\- e.g. tag1 OR tag2 OR tag3.
.IP "\(bu" 2m
If a host and/or path are also specified, these are treated as boolean AND with
any tags.
.RE
.sp
Up to 10 tags may be specified in a single invalidation request.
.RE
.RE
.sp
.SH "GCLOUD WIDE FLAGS"
These flags are available to all commands: \-\-access\-token\-file, \-\-account,
\-\-billing\-project, \-\-configuration, \-\-flags\-file, \-\-flatten,
\-\-format, \-\-help, \-\-impersonate\-service\-account, \-\-log\-http,
\-\-project, \-\-quiet, \-\-trace\-token, \-\-user\-output\-enabled,
\-\-verbosity.
Run \fB$ gcloud help\fR for details.
.SH "API REFERENCE"
This command uses the \fBnetworkservices/v1\fR API. The full documentation for
this API can be found at: https://cloud.google.com/networking
.SH "NOTES"
This variant is also available:
.RS 2m
$ gcloud alpha edge\-cache services invalidate\-cache
.RE