Annotation Interface CacheControl


@Target({TYPE,METHOD}) @Retention(RUNTIME) public @interface CacheControl
Provides Cache-Control header for Spring MVC controllers.
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Array of non-parameterized response directives
    int
    The "max-age" response directive indicates that the response is to be considered stale after its age is greater than the specified number of seconds.
    int
    The "s-maxage" response directive indicates that, in shared caches, the maximum age specified by this directive overrides the maximum age specified by either the max-age directive or the Expires header field.
  • Element Details

    • directive

      Array of non-parameterized response directives
      Default:
      {NO_CACHE}
    • maxAge

      int maxAge
      The "max-age" response directive indicates that the response is to be considered stale after its age is greater than the specified number of seconds.
      Default:
      -1
    • sMaxAge

      int sMaxAge
      The "s-maxage" response directive indicates that, in shared caches, the maximum age specified by this directive overrides the maximum age specified by either the max-age directive or the Expires header field. The s-maxage directive also implies the semantics of the proxy-revalidate response directive.
      Default:
      -1