Enum CacheControlDirective
- java.lang.Object
-
- java.lang.Enum<CacheControlDirective>
-
- de.hybris.platform.webservicescommons.cache.CacheControlDirective
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<CacheControlDirective>
public enum CacheControlDirective extends java.lang.Enum<CacheControlDirective>
An enumeration of cache control directives- See Also:
- RFC 7234
-
-
Enum Constant Summary
Enum Constants Enum Constant Description MUST_REVALIDATEThe "must-revalidate" response directive indicates that once it has become stale, a cache MUST NOT use the response to satisfy subsequent requests without successful validation on the origin server.NO_CACHEThe "no-cache" response directive indicates that the response MUST NOT be used to satisfy a subsequent request without successful validation on the origin server.NO_STOREThe "no-store" response directive indicates that a cache MUST NOT store any part of either the immediate request or response.NO_TRANSFORMThe "no-transform" response directive indicates that an intermediary (regardless of whether it implements a cache) MUST NOT transform the payload, as defined in Section 5.7.2 of [RFC7230].PRIVATEThe "private" response directive indicates that the response message is intended for a single user and MUST NOT be stored by a shared cache.PROXY_REVALIDATEThe "proxy-revalidate" response directive has the same meaning as the must-revalidate response directive, except that it does not apply to private caches.PUBLICThe "public" response directive indicates that any cache MAY store the response, even if the response would normally be non-cacheable or cacheable only within a private cache.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringtoString()static CacheControlDirectivevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static CacheControlDirective[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PUBLIC
public static final CacheControlDirective PUBLIC
The "public" response directive indicates that any cache MAY store the response, even if the response would normally be non-cacheable or cacheable only within a private cache. (See Section 3.2 for additional details related to the use of public in response to a request containing Authorization, and Section 3 for details of how public affects responses that would normally not be stored, due to their status codes not being defined as cacheable by default; see Section 4.2.2.)
-
PRIVATE
public static final CacheControlDirective PRIVATE
The "private" response directive indicates that the response message is intended for a single user and MUST NOT be stored by a shared cache. A private cache MAY store the response and reuse it for later requests, even if the response would normally be non-cacheable.
-
NO_CACHE
public static final CacheControlDirective NO_CACHE
The "no-cache" response directive indicates that the response MUST NOT be used to satisfy a subsequent request without successful validation on the origin server. This allows an origin server to prevent a cache from using it to satisfy a request without contacting it, even by caches that have been configured to send stale responses.
-
NO_STORE
public static final CacheControlDirective NO_STORE
The "no-store" response directive indicates that a cache MUST NOT store any part of either the immediate request or response. This directive applies to both private and shared caches. "MUST NOT store" in this context means that the cache MUST NOT intentionally store the information in non-volatile storage, and MUST make a best-effort attempt to remove the information from volatile storage as promptly as possible after forwarding it. This directive is NOT a reliable or sufficient mechanism for ensuring privacy. In particular, malicious or compromised caches might not recognize or obey this directive, and communications networks might be vulnerable to eavesdropping.
-
NO_TRANSFORM
public static final CacheControlDirective NO_TRANSFORM
The "no-transform" response directive indicates that an intermediary (regardless of whether it implements a cache) MUST NOT transform the payload, as defined in Section 5.7.2 of [RFC7230].
-
MUST_REVALIDATE
public static final CacheControlDirective MUST_REVALIDATE
The "must-revalidate" response directive indicates that once it has become stale, a cache MUST NOT use the response to satisfy subsequent requests without successful validation on the origin server. The must-revalidate directive is necessary to support reliable operation for certain protocol features. In all circumstances a cache MUST obey the must-revalidate directive; in particular, if a cache cannot reach the origin server for any reason, it MUST generate a 504 (Gateway Timeout) response. The must-revalidate directive ought to be used by servers if and only if failure to validate a request on the representation could result in incorrect operation, such as a silently unexecuted financial transaction.
-
PROXY_REVALIDATE
public static final CacheControlDirective PROXY_REVALIDATE
The "proxy-revalidate" response directive has the same meaning as the must-revalidate response directive, except that it does not apply to private caches.
-
-
Method Detail
-
values
public static CacheControlDirective[] 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 (CacheControlDirective c : CacheControlDirective.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CacheControlDirective 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 namejava.lang.NullPointerException- if the argument is null
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Enum<CacheControlDirective>
-
-