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 CachePolicyStandard "immutable" response directivestatic CachePolicyPreset combination of "no-cache, max-age=0" response directives to completely disable caching.static CachePolicyPreset (alias) using "private" response directive to disable shared cache onlystatic CachePolicyPreset using "max-age=31536000" (one year) serving as "permanent" cachingstatic CachePolicyStandard "must-revalidate" response directivestatic CachePolicyStandard "must-understand" response directivestatic CachePolicyStandard "no-cache" response directivestatic CachePolicyStandard "no-store" response directivestatic CachePolicyStandard "no-transform" response directivestatic CachePolicyStandard "private" response directivestatic CachePolicyStandard "proxy-revalidate" response directivestatic CachePolicyStandard "public" response directivestatic CachePolicyStandard "stale-if-error" response directivestatic CachePolicyStandard "stale-while-revalidate" response directive -
Method Summary
Modifier and TypeMethodDescriptionstatic CachePolicyMAX_AGE(int value) Standard "max-age=N" response directivestatic CachePolicyS_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-intN seconds
-
S_MAXAGE
Standard "s-maxage=N" response directive- Parameters:
value-intN seconds
-