public final class ServerCacheControlBuilder extends Object
ServerCacheControl using the builder pattern.
ServerCacheControl cacheControl =
ServerCacheControl.builder()
.noCache()
.noStore()
.mustRevalidate()
.build();
| Constructor and Description |
|---|
ServerCacheControlBuilder()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
ServerCacheControl |
build()
Returns a newly created
ServerCacheControl with the directives enabled so far. |
ServerCacheControlBuilder |
cachePrivate()
Enables the
"private" directive. |
ServerCacheControlBuilder |
cachePrivate(boolean cachePrivate)
Enables or disables the
"private" directive. |
ServerCacheControlBuilder |
cachePublic()
Enables the
"public" directive. |
ServerCacheControlBuilder |
cachePublic(boolean cachePublic)
Enables or disables the
"public" directive. |
ServerCacheControlBuilder |
immutable()
Enables the
"immutable" directive. |
ServerCacheControlBuilder |
immutable(boolean immutable)
Enables or disables the
"immutable" directive. |
ServerCacheControlBuilder |
maxAge(Duration maxAge)
Enables or disables the
"max-age" directive. |
ServerCacheControlBuilder |
maxAgeSeconds(long maxAgeSeconds)
Enables the
"max-age" directive. |
ServerCacheControlBuilder |
mustRevalidate()
Enables the
"must-revalidate" directive. |
ServerCacheControlBuilder |
mustRevalidate(boolean mustRevalidate)
Enables or disables the
"must-revalidate" directive. |
ServerCacheControlBuilder |
noCache()
Enables the
"no-cache" directive. |
ServerCacheControlBuilder |
noCache(boolean noCache)
Enables or disables the
"no-cache" directive. |
ServerCacheControlBuilder |
noStore()
Enables the
"no-store" directive. |
ServerCacheControlBuilder |
noStore(boolean noStore)
Enables or disables the
"no-store" directive. |
ServerCacheControlBuilder |
noTransform()
Enables the
"no-transform" directive. |
ServerCacheControlBuilder |
noTransform(boolean noTransform)
Enables or disables the
"no-transform" directive. |
ServerCacheControlBuilder |
proxyRevalidate()
Enables the
"proxy-revalidate" directive. |
ServerCacheControlBuilder |
proxyRevalidate(boolean proxyRevalidate)
Enables or disables the
"proxy-revalidate" directive. |
ServerCacheControlBuilder |
sMaxAge(Duration sMaxAge)
Enables or disables the
"s-maxage" directive. |
ServerCacheControlBuilder |
sMaxAgeSeconds(long sMaxAgeSeconds)
Enables the
"s-maxage" directive. |
@Deprecated public ServerCacheControlBuilder()
ServerCacheControl.builder().public ServerCacheControlBuilder cachePublic()
"public" directive.public ServerCacheControlBuilder cachePublic(boolean cachePublic)
"public" directive.cachePublic - true to enable or false to disable.public ServerCacheControlBuilder cachePrivate()
"private" directive.public ServerCacheControlBuilder cachePrivate(boolean cachePrivate)
"private" directive.cachePrivate - true to enable or false to disable.public ServerCacheControlBuilder immutable()
"immutable" directive.public ServerCacheControlBuilder immutable(boolean immutable)
"immutable" directive.immutable - true to enable or false to disable.public ServerCacheControlBuilder mustRevalidate()
"must-revalidate" directive.public ServerCacheControlBuilder mustRevalidate(boolean mustRevalidate)
"must-revalidate" directive.mustRevalidate - true to enable or false to disable.public ServerCacheControlBuilder proxyRevalidate()
"proxy-revalidate" directive.public ServerCacheControlBuilder proxyRevalidate(boolean proxyRevalidate)
"proxy-revalidate" directive.proxyRevalidate - true to enable or false to disable.public ServerCacheControlBuilder sMaxAge(Duration sMaxAge)
"s-maxage" directive.sMaxAge - the value of the directive to enable, or null to disable.public ServerCacheControlBuilder sMaxAgeSeconds(long sMaxAgeSeconds)
"s-maxage" directive.sMaxAgeSeconds - the value in seconds.public ServerCacheControl build()
ServerCacheControl with the directives enabled so far.public ServerCacheControlBuilder noCache()
"no-cache" directive.public ServerCacheControlBuilder noCache(boolean noCache)
"no-cache" directive.noCache - true to enable or false to disable.public ServerCacheControlBuilder noStore()
"no-store" directive.public ServerCacheControlBuilder noStore(boolean noStore)
"no-store" directive.noStore - true to enable or false to disable.public ServerCacheControlBuilder noTransform()
"no-transform" directive.public ServerCacheControlBuilder noTransform(boolean noTransform)
"no-transform" directive.noTransform - true to enable or false to disable.public ServerCacheControlBuilder maxAge(Duration maxAge)
"max-age" directive.maxAge - the value of the directive to enable, or null to disable.public ServerCacheControlBuilder maxAgeSeconds(long maxAgeSeconds)
"max-age" directive.maxAgeSeconds - the value in seconds.Copyright © 2020 LeanCloud. All rights reserved.