Class CacheControlFilter

    • Field Detail

      • CONFIG_HTTP_CACHE_MAX_AGE

        public static final String CONFIG_HTTP_CACHE_MAX_AGE
        The configuration key for setting a cache-control max-age header.
        See Also:
        Constant Field Values
      • CONFIG_HTTP_CACHE_REVALIDATE

        public static final String CONFIG_HTTP_CACHE_REVALIDATE
        The configuration key for setting a cache-control must-revalidate header.
        See Also:
        Constant Field Values
      • CONFIG_HTTP_CACHE_NOCACHE

        public static final String CONFIG_HTTP_CACHE_NOCACHE
        The configuration key for setting a cache-control no-cache header.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CacheControlFilter

        public CacheControlFilter()
        Create a CacheControl decorator.
    • Method Detail

      • setMaxAge

        public void setMaxAge​(int maxAge)
        Set the cache age.
        Parameters:
        maxAge - the cache age in seconds
      • setMustRevalidate

        public void setMustRevalidate​(boolean mustRevalidate)
        Set the revalidate flag.
        Parameters:
        mustRevalidate - true if cliens must revalidate
      • setNoCache

        public void setNoCache​(boolean noCache)
        Set the no-cache flag.
        Parameters:
        noCache - true if the no-cache flag is to be returned