public abstract class CacheControl extends Object
ServerCacheControl for
response-side and ClientCacheControl for request-side.CacheControlBuilder,
Cache-Control (MDN)| Modifier and Type | Method and Description |
|---|---|
abstract String |
asHeaderValue()
Encodes the directives in this
CacheControl into an HTTP "cache-control" header value. |
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
isEmpty()
Returns
true if all directives are disabled. |
long |
maxAgeSeconds()
Returns the value of the
"max-age" directive or -1 if disabled. |
boolean |
noCache()
Returns whether the
"no-cache" directive is enabled. |
boolean |
noStore()
Returns whether the
"no-store" directive is enabled. |
boolean |
noTransform()
Returns whether the
"no-transform" directive is enabled. |
abstract com.linecorp.armeria.common.CacheControlBuilder |
toBuilder()
Returns a newly created
CacheControlBuilder which has the same initial directives with
this CacheControl. |
String |
toString() |
public boolean isEmpty()
true if all directives are disabled.public final boolean noCache()
"no-cache" directive is enabled.public final boolean noStore()
"no-store" directive is enabled.public final boolean noTransform()
"no-transform" directive is enabled.public final long maxAgeSeconds()
"max-age" directive or -1 if disabled.public abstract com.linecorp.armeria.common.CacheControlBuilder toBuilder()
CacheControlBuilder which has the same initial directives with
this CacheControl.public abstract String asHeaderValue()
CacheControl into an HTTP "cache-control" header value."cache-control" header value, or an empty string if no directives were enabled.Copyright © 2020 LeanCloud. All rights reserved.