gcloud alpha edge-cache services invalidate-cache Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud alpha edge-cache services invalidate-cache - invalidate the cache for an EdgeCacheService resource
- SYNOPSIS
gcloud alpha edge-cache services invalidate-cache(SERVICE:--location=LOCATION)(--host=HOST--path=PATH--tags=[TAGS,…])[GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(ALPHA)Invalidate the cache entries associated with anEdgeCacheService resource.- EXAMPLES
- To invalidate content via a tag, or tags for a given host for anEdgeCacheService named 'my-service':
gcloudalphaedge-cacheservicesinvalidate-cachemy-service--tags="status=404"--host="media.example.com"To invalidate all content under a specific path, specify an exact path, or aprefix. Prefixes are denoted with a trailing
*character.gcloudalphaedge-cacheservicesinvalidate-cachemy-service--path="/static/*"You can optionally combine this with a status code. For example, to invalidateall cached HTTP 404s:
gcloudalphaedge-cacheservicesinvalidate-cachemy-service--tags="status=404"--path="/static/*" - POSITIONAL ARGUMENTS
- Service resource - The EdgeCacheService resource you want to invalidate thecache for. The arguments in this group can be used to specify the attributes ofthis resource. (NOTE) Some attributes are not given arguments in this group butcan be set in other ways.
To set the
projectattribute:- provide the argument
serviceon the command line with a fullyspecified name; - provide the argument
--projecton the command line; - set the property
core/project.
This must be specified.
SERVICE- ID of the service or fully qualified identifier for the service.
To set the
serviceattribute:- provide the argument
serviceon the command line.
This positional argument must be specified if any of the other arguments in thisgroup are specified.
- provide the argument
--location=LOCATION- The location Id.To set the
locationattribute:- provide the argument
serviceon the command line with a fullyspecified name; - provide the argument
--locationon the command line; - use global location.
- provide the argument
- provide the argument
- Service resource - The EdgeCacheService resource you want to invalidate thecache for. The arguments in this group can be used to specify the attributes ofthis resource. (NOTE) Some attributes are not given arguments in this group butcan be set in other ways.
- REQUIRED FLAGS
- At least one of these must be specified:
--host=HOST- The hostname to invalidate against. You can specify an exact or wildcard host -e.g. "video.example.com" or "
.example.com" - based on host component. - --path
=PATH - The path to invalidate against. You can specify an exact or wildcard host - e.g."/videos/hls/139123.mp4" or "/manifests/" - based on path component.
--tags=[TAGS,…]- 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 ofthe response, the MIME content-type, and the origin.
- Multiple cache tags in the same revalidation request are treated as boolean OR -e.g. tag1 OR tag2 OR tag3.
- If a host and/or path are also specified, these are treated as boolean AND withany tags.
Up to 10 tags may be specified in a single invalidation request.
- At least one of these must be specified:
- 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
$gcloud helpfor details. - API REFERENCE
- This command uses the
networkservices/v1alpha1API. The fulldocumentation for this API can be found at:https://cloud.google.com/networking - NOTES
- This command is currently in alpha and might change without notice. If thiscommand fails with API permission errors despite specifying the correct project,you might be trying to access an API with an invitation-only early accessallowlist. This variant is also available:
gcloudedge-cacheservicesinvalidate-cache
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-07 UTC.