Enum CachePolicy.CacheMode

java.lang.Object
java.lang.Enum<CachePolicy.CacheMode>
com.google.cloud.compute.v1.CachePolicy.CacheMode
All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite, com.google.protobuf.ProtocolMessageEnum, Serializable, Comparable<CachePolicy.CacheMode>
Enclosing class:
CachePolicy

public static enum CachePolicy.CacheMode extends Enum<CachePolicy.CacheMode> implements com.google.protobuf.ProtocolMessageEnum
 Specifies the cache setting for all responses from this route. If not
 specified, Cloud CDN uses `CACHE_ALL_STATIC` mode.
 
Protobuf enum google.cloud.compute.v1.CachePolicy.CacheMode
  • Enum Constant Details

    • UNDEFINED_CACHE_MODE

      public static final CachePolicy.CacheMode UNDEFINED_CACHE_MODE
       A value indicating that the enum field is not set.
       
      UNDEFINED_CACHE_MODE = 0;
    • CACHE_ALL_STATIC

      public static final CachePolicy.CacheMode 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

      public static final CachePolicy.CacheMode 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;
    • USE_ORIGIN_HEADERS

      public static final CachePolicy.CacheMode USE_ORIGIN_HEADERS
       Requires the origin to set valid caching headers to cache content.
       Responses without these headers will not be cached at the 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

      public static final CachePolicy.CacheMode UNRECOGNIZED
  • Field Details

    • UNDEFINED_CACHE_MODE_VALUE

      public static final int UNDEFINED_CACHE_MODE_VALUE
       A 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_VALUE
       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;
      See Also:
    • FORCE_CACHE_ALL_VALUE

      public static final int FORCE_CACHE_ALL_VALUE
       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;
      See Also:
    • USE_ORIGIN_HEADERS_VALUE

      public static final int USE_ORIGIN_HEADERS_VALUE
       Requires the origin to set valid caching headers to cache content.
       Responses without these headers will not be cached at the 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

      public static CachePolicy.CacheMode[] 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

      public static CachePolicy.CacheMode valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getNumber

      public final int getNumber()
      Specified by:
      getNumber in interface com.google.protobuf.Internal.EnumLite
      Specified by:
      getNumber in interface com.google.protobuf.ProtocolMessageEnum
    • valueOf

      @Deprecated public static CachePolicy.CacheMode valueOf(int value)
      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 name
      NullPointerException - if the argument is null
    • forNumber

      public static CachePolicy.CacheMode forNumber(int value)
      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<CachePolicy.CacheMode> internalGetValueMap()
    • getValueDescriptor

      public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
      Specified by:
      getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptorForType

      public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptor

      public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
    • valueOf

      public static CachePolicy.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 name
      NullPointerException - if the argument is null