Package com.isomorphic.servlet
Class CachePolicy
java.lang.Object
com.isomorphic.servlet.CachePolicy
Provides all standard Cache-Control HTTP header response directives and some presets for most common usages.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic CachePolicy
Standard "immutable" response directivestatic CachePolicy
Preset combination of "no-cache, max-age=0" response directives to completely disable caching.static CachePolicy
Preset (alias) using "private" response directive to disable shared cache onlystatic CachePolicy
Preset using "max-age=31536000" (one year) serving as "permanent" cachingstatic CachePolicy
Standard "must-revalidate" response directivestatic CachePolicy
Standard "must-understand" response directivestatic CachePolicy
Standard "no-cache" response directivestatic CachePolicy
Standard "no-store" response directivestatic CachePolicy
Standard "no-transform" response directivestatic CachePolicy
Standard "private" response directivestatic CachePolicy
Standard "proxy-revalidate" response directivestatic CachePolicy
Standard "public" response directivestatic CachePolicy
Standard "stale-if-error" response directivestatic CachePolicy
Standard "stale-while-revalidate" response directive -
Method Summary
Modifier and TypeMethodDescriptionstatic CachePolicy
MAX_AGE
(int value) Standard "max-age=N" response directivestatic CachePolicy
S_MAXAGE
(int value) Standard "s-maxage=N" response directive
-
Field Details
-
NO_CACHE
Standard "no-cache" response directive -
NO_STORE
Standard "no-store" response directive -
NO_TRANSFORM
Standard "no-transform" response directive -
MUST_REVALIDATE
Standard "must-revalidate" response directive -
PROXY_REVALIDATE
Standard "proxy-revalidate" response directive -
MUST_UNDERSTAND
Standard "must-understand" response directive -
PRIVATE
Standard "private" response directive -
PUBLIC
Standard "public" response directive -
IMMUTABLE
Standard "immutable" response directive -
STALE_WHILE_REVALIDATE
Standard "stale-while-revalidate" response directive -
STALE_IF_ERROR
Standard "stale-if-error" response directive -
ISC_DISABLE_CACHE
Preset combination of "no-cache, max-age=0" response directives to completely disable caching. -
ISC_DISABLE_SHARED_CACHE
Preset (alias) using "private" response directive to disable shared cache only -
ISC_PERMANENT_CACHE
Preset using "max-age=31536000" (one year) serving as "permanent" caching
-
-
Method Details
-
MAX_AGE
Standard "max-age=N" response directive- Parameters:
value
-int
N seconds
-
S_MAXAGE
Standard "s-maxage=N" response directive- Parameters:
value
-int
N seconds
-