Enum WebResponse.CacheScope

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<WebResponse.CacheScope>
    Enclosing class:
    WebResponse

    public static enum WebResponse.CacheScope
    extends java.lang.Enum<WebResponse.CacheScope>
    caching scope for data

    Unless the data is confidential, session-specific or user-specific the general advice is to prefer value PUBLIC for best network performance.

    This value will basically affect the header [Cache-Control]. Details can be found here or in RFC-2616.

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      PRIVATE
      only use non-public caches
      PUBLIC
      use all caches (private + public)
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static WebResponse.CacheScope valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static WebResponse.CacheScope[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • PUBLIC

        public static final WebResponse.CacheScope PUBLIC
        use all caches (private + public)

        Use this value for caching if the data is not confidential or session-specific. It will allow public caches to cache the data. In some versions of Firefox this will enable caching of resources over SSL (details can be found here).

      • PRIVATE

        public static final WebResponse.CacheScope PRIVATE
        only use non-public caches

        Use this setting if the response is session-specific or confidential and you don't want it to be cached on public caches or proxies. On some versions of Firefox this will disable caching of any resources in over SSL connections.

    • Method Detail

      • values

        public static WebResponse.CacheScope[] 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 (WebResponse.CacheScope c : WebResponse.CacheScope.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static WebResponse.CacheScope valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null