com.isomorphic.servlet

## Class CachePolicy

- java.lang.Object
- - com.isomorphic.servlet.CachePolicy

-     public class CachePolicy
      extends java.lang.Object

  Provides all standard Cache-Control HTTP header response directives and some presets for most common usages.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static CachePolicy` | `IMMUTABLE` Standard "immutable" response directive
    `static CachePolicy` | `ISC_DISABLE_CACHE` Preset combination of "no-cache, max-age=0" response directives to completely disable caching.
    `static CachePolicy` | `ISC_DISABLE_SHARED_CACHE` Preset (alias) using "private" response directive to disable shared cache only
    `static CachePolicy` | `ISC_PERMANENT_CACHE` Preset using "max-age=31536000" (one year) serving as "permanent" caching
    `static CachePolicy` | `MUST_REVALIDATE` Standard "must-revalidate" response directive
    `static CachePolicy` | `MUST_UNDERSTAND` Standard "must-understand" response directive
    `static CachePolicy` | `NO_CACHE` Standard "no-cache" response directive
    `static CachePolicy` | `NO_STORE` Standard "no-store" response directive
    `static CachePolicy` | `NO_TRANSFORM` Standard "no-transform" response directive
    `static CachePolicy` | `PRIVATE` Standard "private" response directive
    `static CachePolicy` | `PROXY_REVALIDATE` Standard "proxy-revalidate" response directive
    `static CachePolicy` | `PUBLIC` Standard "public" response directive
    `static CachePolicy` | `STALE_IF_ERROR` Standard "stale-if-error" response directive
    `static CachePolicy` | `STALE_WHILE_REVALIDATE` Standard "stale-while-revalidate" response directive

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static CachePolicy` | `MAX_AGE(int value)` Standard "max-age=N" response directive
    `static CachePolicy` | `S_MAXAGE(int value)` Standard "s-maxage=N" response directive

- - ### Field Detail

    - #### NO_CACHE

          public static CachePolicy NO_CACHE

      Standard "no-cache" response directive

    - #### NO_STORE

          public static CachePolicy NO_STORE

      Standard "no-store" response directive

    - #### NO_TRANSFORM

          public static CachePolicy NO_TRANSFORM

      Standard "no-transform" response directive

    - #### MUST_REVALIDATE

          public static CachePolicy MUST_REVALIDATE

      Standard "must-revalidate" response directive

    - #### PROXY_REVALIDATE

          public static CachePolicy PROXY_REVALIDATE

      Standard "proxy-revalidate" response directive

    - #### MUST_UNDERSTAND

          public static CachePolicy MUST_UNDERSTAND

      Standard "must-understand" response directive

    - #### PRIVATE

          public static CachePolicy PRIVATE

      Standard "private" response directive

    - #### PUBLIC

          public static CachePolicy PUBLIC

      Standard "public" response directive

    - #### IMMUTABLE

          public static CachePolicy IMMUTABLE

      Standard "immutable" response directive

    - #### STALE_WHILE_REVALIDATE

          public static CachePolicy STALE_WHILE_REVALIDATE

      Standard "stale-while-revalidate" response directive

    - #### STALE_IF_ERROR

          public static CachePolicy STALE_IF_ERROR

      Standard "stale-if-error" response directive

    - #### ISC_DISABLE_CACHE

          public static CachePolicy ISC_DISABLE_CACHE

      Preset combination of "no-cache, max-age=0" response directives to completely disable caching.

    - #### ISC_DISABLE_SHARED_CACHE

          public static CachePolicy ISC_DISABLE_SHARED_CACHE

      Preset (alias) using "private" response directive to disable shared cache only

    - #### ISC_PERMANENT_CACHE

          public static CachePolicy ISC_PERMANENT_CACHE

      Preset using "max-age=31536000" (one year) serving as "permanent" caching

  - ### Method Detail

    - #### MAX_AGE

          public static CachePolicy MAX_AGE(int value)

      Standard "max-age=N" response directive
      Parameters:
        `value` - `int` N seconds

    - #### S_MAXAGE

          public static CachePolicy S_MAXAGE(int value)

      Standard "s-maxage=N" response directive
      Parameters:
        `value` - `int` N seconds