Package org.springframework.security.web.server.header

# Class CacheControlServerHttpHeadersWriter

java.lang.Object
org.springframework.security.web.server.header.CacheControlServerHttpHeadersWriter

All Implemented Interfaces:
  `ServerHttpHeadersWriter`

public class CacheControlServerHttpHeadersWriter extends 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 final String`
`CACHE_CONTRTOL_VALUE`
The value for cache control value
`static final String`
`EXPIRES_VALUE`
The value for expires value
`static final String`
`PRAGMA_VALUE`
The value for pragma value

## Constructor Summary

Constructors
Constructor
Description
`CacheControlServerHttpHeadersWriter()`

## Method Summary

Modifier and Type
Method
Description
`reactor.core.publisher.Mono<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 Details

### EXPIRES_VALUE

public static final String EXPIRES_VALUE
The value for expires value

See Also:
  - Constant Field Values

### PRAGMA_VALUE

public static final String PRAGMA_VALUE
The value for pragma value

See Also:
  - Constant Field Values

### CACHE_CONTRTOL_VALUE

public static final String CACHE_CONTRTOL_VALUE
The value for cache control value

See Also:
  - Constant Field Values

## Constructor Details

### CacheControlServerHttpHeadersWriter

public CacheControlServerHttpHeadersWriter()

## Method Details

### writeHttpHeaders

public reactor.core.publisher.Mono<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)`.