Package com.linecorp.armeria.common
Class ServerCacheControlBuilder
java.lang.Object
com.linecorp.armeria.common.ServerCacheControlBuilder
Creates a new
ServerCacheControl
using the builder pattern.
ServerCacheControl cacheControl =
ServerCacheControl.builder()
.noCache()
.noStore()
.mustRevalidate()
.build();
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns a newly createdServerCacheControl
with the directives enabled so far.Enables the"private"
directive.cachePrivate
(boolean cachePrivate) Enables or disables the"private"
directive.Enables the"public"
directive.cachePublic
(boolean cachePublic) Enables or disables the"public"
directive.Enables the"immutable"
directive.immutable
(boolean immutable) Enables or disables the"immutable"
directive.Enables or disables the"max-age"
directive.maxAgeSeconds
(long maxAgeSeconds) Enables the"max-age"
directive.Enables the"must-revalidate"
directive.mustRevalidate
(boolean mustRevalidate) Enables or disables the"must-revalidate"
directive.noCache()
Enables the"no-cache"
directive.noCache
(boolean noCache) Enables or disables the"no-cache"
directive.noStore()
Enables the"no-store"
directive.noStore
(boolean noStore) Enables or disables the"no-store"
directive.Enables the"no-transform"
directive.noTransform
(boolean noTransform) Enables or disables the"no-transform"
directive.Enables the"proxy-revalidate"
directive.proxyRevalidate
(boolean proxyRevalidate) Enables or disables the"proxy-revalidate"
directive.Enables or disables the"s-maxage"
directive.sMaxAgeSeconds
(long sMaxAgeSeconds) Enables the"s-maxage"
directive.
-
Method Details
-
cachePublic
Enables the"public"
directive. -
cachePublic
Enables or disables the"public"
directive.- Parameters:
cachePublic
-true
to enable orfalse
to disable.
-
cachePrivate
Enables the"private"
directive. -
cachePrivate
Enables or disables the"private"
directive.- Parameters:
cachePrivate
-true
to enable orfalse
to disable.
-
immutable
Enables the"immutable"
directive. -
immutable
Enables or disables the"immutable"
directive.- Parameters:
immutable
-true
to enable orfalse
to disable.
-
mustRevalidate
Enables the"must-revalidate"
directive. -
mustRevalidate
Enables or disables the"must-revalidate"
directive.- Parameters:
mustRevalidate
-true
to enable orfalse
to disable.
-
proxyRevalidate
Enables the"proxy-revalidate"
directive. -
proxyRevalidate
Enables or disables the"proxy-revalidate"
directive.- Parameters:
proxyRevalidate
-true
to enable orfalse
to disable.
-
sMaxAge
Enables or disables the"s-maxage"
directive.- Parameters:
sMaxAge
- the value of the directive to enable, ornull
to disable.
-
sMaxAgeSeconds
Enables the"s-maxage"
directive.- Parameters:
sMaxAgeSeconds
- the value in seconds.
-
build
Returns a newly createdServerCacheControl
with the directives enabled so far. -
noCache
Enables the"no-cache"
directive. -
noCache
Enables or disables the"no-cache"
directive.- Parameters:
noCache
-true
to enable orfalse
to disable.
-
noStore
Enables the"no-store"
directive. -
noStore
Enables or disables the"no-store"
directive.- Parameters:
noStore
-true
to enable orfalse
to disable.
-
noTransform
Enables the"no-transform"
directive. -
noTransform
Enables or disables the"no-transform"
directive.- Parameters:
noTransform
-true
to enable orfalse
to disable.
-
maxAge
Enables or disables the"max-age"
directive.- Parameters:
maxAge
- the value of the directive to enable, ornull
to disable.
-
maxAgeSeconds
Enables the"max-age"
directive.- Parameters:
maxAgeSeconds
- the value in seconds.
-