Package com.google.cloud.compute.v1
Enum BackendServiceCdnPolicy.CacheMode
java.lang.Object
java.lang.Enum<BackendServiceCdnPolicy.CacheMode>
com.google.cloud.compute.v1.BackendServiceCdnPolicy.CacheMode
- All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite,com.google.protobuf.ProtocolMessageEnum,Serializable,Comparable<BackendServiceCdnPolicy.CacheMode>
- Enclosing class:
- BackendServiceCdnPolicy
public static enum BackendServiceCdnPolicy.CacheMode
extends Enum<BackendServiceCdnPolicy.CacheMode>
implements com.google.protobuf.ProtocolMessageEnum
Specifies the cache setting for all responses from this backend. The possible values are:USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server.FORCE_CACHE_ALL Cache all content, ignoring any "private", "no-store" or "no-cache" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content.CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached. If no value is provided for cdnPolicy.cacheMode, it defaults to CACHE_ALL_STATIC.Protobuf enum
google.cloud.compute.v1.BackendServiceCdnPolicy.CacheMode-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAutomatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS).Cache all content, ignoring any "private", "no-store" or "no-cache" directives in Cache-Control response headers.INVALID_CACHE_MODE = 381295560;A value indicating that the enum field is not set.Requires the origin to set valid caching headers to cache content. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intAutomatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS).static final intCache all content, ignoring any "private", "no-store" or "no-cache" directives in Cache-Control response headers.static final intINVALID_CACHE_MODE = 381295560;static final intA value indicating that the enum field is not set.static final intRequires the origin to set valid caching headers to cache content. -
Method Summary
Modifier and TypeMethodDescriptionforNumber(int value) static com.google.protobuf.Descriptors.EnumDescriptorfinal com.google.protobuf.Descriptors.EnumDescriptorfinal intfinal com.google.protobuf.Descriptors.EnumValueDescriptorstatic com.google.protobuf.Internal.EnumLiteMap<BackendServiceCdnPolicy.CacheMode>valueOf(int value) Deprecated.valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) Returns the enum constant of this type with the specified name.Returns the enum constant of this type with the specified name.static BackendServiceCdnPolicy.CacheMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
UNDEFINED_CACHE_MODE
A value indicating that the enum field is not set.
UNDEFINED_CACHE_MODE = 0; -
CACHE_ALL_STATIC
Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached.
CACHE_ALL_STATIC = 355027945; -
FORCE_CACHE_ALL
Cache all content, ignoring any "private", "no-store" or "no-cache" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content.
FORCE_CACHE_ALL = 486026928; -
INVALID_CACHE_MODE
INVALID_CACHE_MODE = 381295560; -
USE_ORIGIN_HEADERS
Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server.
USE_ORIGIN_HEADERS = 55380261; -
UNRECOGNIZED
-
-
Field Details
-
UNDEFINED_CACHE_MODE_VALUE
public static final int UNDEFINED_CACHE_MODE_VALUEA value indicating that the enum field is not set.
UNDEFINED_CACHE_MODE = 0;- See Also:
-
CACHE_ALL_STATIC_VALUE
public static final int CACHE_ALL_STATIC_VALUEAutomatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached.
CACHE_ALL_STATIC = 355027945;- See Also:
-
FORCE_CACHE_ALL_VALUE
public static final int FORCE_CACHE_ALL_VALUECache all content, ignoring any "private", "no-store" or "no-cache" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content.
FORCE_CACHE_ALL = 486026928;- See Also:
-
INVALID_CACHE_MODE_VALUE
public static final int INVALID_CACHE_MODE_VALUEINVALID_CACHE_MODE = 381295560;- See Also:
-
USE_ORIGIN_HEADERS_VALUE
public static final int USE_ORIGIN_HEADERS_VALUERequires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server.
USE_ORIGIN_HEADERS = 55380261;- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getNumber
public final int getNumber()- Specified by:
getNumberin interfacecom.google.protobuf.Internal.EnumLite- Specified by:
getNumberin interfacecom.google.protobuf.ProtocolMessageEnum
-
valueOf
Deprecated.Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
value- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
forNumber
- Parameters:
value- The numeric wire value of the corresponding enum entry.- Returns:
- The enum associated with the given numeric wire value.
-
internalGetValueMap
public static com.google.protobuf.Internal.EnumLiteMap<BackendServiceCdnPolicy.CacheMode> internalGetValueMap() -
getValueDescriptor
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()- Specified by:
getValueDescriptorin interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptor
public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() -
valueOf
public static BackendServiceCdnPolicy.CacheMode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
desc- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-