Enum 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.
     
    Protobuf enum google.cloud.compute.v1.BackendServiceCdnPolicy.CacheMode
    • Enum Constant Detail

      • UNDEFINED_CACHE_MODE

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

        public static final BackendServiceCdnPolicy.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 BackendServiceCdnPolicy.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 BackendServiceCdnPolicy.CacheMode 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;
    • Field Detail

      • 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:
        Constant Field Values
      • 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:
        Constant Field Values
      • 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:
        Constant Field Values
      • INVALID_CACHE_MODE_VALUE

        public static final int INVALID_CACHE_MODE_VALUE
        INVALID_CACHE_MODE = 381295560;
        See Also:
        Constant Field Values
      • 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 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:
        Constant Field Values
    • Method Detail

      • values

        public static BackendServiceCdnPolicy.CacheMode[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (BackendServiceCdnPolicy.CacheMode c : BackendServiceCdnPolicy.CacheMode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

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