Class CacheControlServerHttpHeadersWriter

  • All Implemented Interfaces:
    ServerHttpHeadersWriter

    public class CacheControlServerHttpHeadersWriter
    extends java.lang.Object
    implements ServerHttpHeadersWriter
    Writes cache control related headers.
     Cache-Control: no-cache, no-store, max-age=0, must-revalidate
     Pragma: no-cache
     Expires: 0
     
    Since:
    5.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CACHE_CONTRTOL_VALUE
      The value for cache control value
      static java.lang.String EXPIRES_VALUE
      The value for expires value
      static java.lang.String PRAGMA_VALUE
      The value for pragma value
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      reactor.core.publisher.Mono<java.lang.Void> writeHttpHeaders​(org.springframework.web.server.ServerWebExchange exchange)
      Write the headers to the response.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • EXPIRES_VALUE

        public static final java.lang.String EXPIRES_VALUE
        The value for expires value
        See Also:
        Constant Field Values
      • PRAGMA_VALUE

        public static final java.lang.String PRAGMA_VALUE
        The value for pragma value
        See Also:
        Constant Field Values
      • CACHE_CONTRTOL_VALUE

        public static final java.lang.String CACHE_CONTRTOL_VALUE
        The value for cache control value
        See Also:
        Constant Field Values
    • Constructor Detail

      • CacheControlServerHttpHeadersWriter

        public CacheControlServerHttpHeadersWriter()
    • Method Detail

      • writeHttpHeaders

        public reactor.core.publisher.Mono<java.lang.Void> writeHttpHeaders​(org.springframework.web.server.ServerWebExchange exchange)
        Description copied from interface: ServerHttpHeadersWriter
        Write the headers to the response.
        Specified by:
        writeHttpHeaders in interface ServerHttpHeadersWriter
        Returns:
        A Mono which is returned to the Supplier of the ReactiveHttpOutputMessage.beforeCommit(Supplier).