CacheControl

zio.http.Header.CacheControl
See theCacheControl companion trait
object CacheControl extends HeaderType

Attributes

Companion
trait
Graph
Supertypes
trait Sum
trait Mirror
trait HeaderType
class Object
trait Matchable
class Any
Show all
Self type

Members list

Type members

Classlikes

case object Immutable extends CacheControl

The immutable response directive indicates that the response will not be updated while it's fresh

The immutable response directive indicates that the response will not be updated while it's fresh

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait CacheControl
trait Header
class Object
trait Matchable
class Any
Show all
Self type
Immutable.type
final case class MaxAge(freshForSeconds: Int) extends CacheControl

The max-age=N response directive indicates that the response remains fresh until N seconds after the response is generated.

The max-age=N response directive indicates that the response remains fresh until N seconds after the response is generated.

The max-age=N request directive indicates that the client allows a stored response that is generated on the origin server within N seconds

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait CacheControl
trait Header
class Object
trait Matchable
class Any
Show all
final case class MaxStale(staleWithinSeconds: Int) extends CacheControl

The max-stale=N request directive indicates that the client allows a stored response that is stale within N seconds.

The max-stale=N request directive indicates that the client allows a stored response that is stale within N seconds.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait CacheControl
trait Header
class Object
trait Matchable
class Any
Show all
final case class MinFresh(freshAtLeastSeconds: Int) extends CacheControl

The min-fresh=N request directive indicates that the client allows a stored response that is fresh for at least N seconds.

The min-fresh=N request directive indicates that the client allows a stored response that is fresh for at least N seconds.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait CacheControl
trait Header
class Object
trait Matchable
class Any
Show all
final case class Multiple(values: NonEmptyChunk[CacheControl]) extends CacheControl

Maintains a chunk of CacheControl values.

Maintains a chunk of CacheControl values.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait CacheControl
trait Header
class Object
trait Matchable
class Any
Show all
case object MustRevalidate extends CacheControl

The must-revalidate response directive indicates that the response can be stored in caches and can be reused while fresh. If the response becomes stale, it must be validated with the origin server before reuse.

The must-revalidate response directive indicates that the response can be stored in caches and can be reused while fresh. If the response becomes stale, it must be validated with the origin server before reuse.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait CacheControl
trait Header
class Object
trait Matchable
class Any
Show all
Self type
case object MustUnderstand extends CacheControl

The must-understand response directive indicates that a cache should store the response only if it understands the requirements for caching based on status code.

The must-understand response directive indicates that a cache should store the response only if it understands the requirements for caching based on status code.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait CacheControl
trait Header
class Object
trait Matchable
class Any
Show all
Self type
case object NoCache extends CacheControl

The no-cache response directive indicates that the response can be stored in caches, but the response must be validated with the origin server before each reuse.

The no-cache response directive indicates that the response can be stored in caches, but the response must be validated with the origin server before each reuse.

The no-cache request directive asks caches to validate the response with the origin server before reuse.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait CacheControl
trait Header
class Object
trait Matchable
class Any
Show all
Self type
NoCache.type
case object NoStore extends CacheControl

The no-store response directive indicates that any caches of any kind (private or shared) should not store this response.

The no-store response directive indicates that any caches of any kind (private or shared) should not store this response.

The no-store request directive allows a client to request that caches refrain from storing the request and corresponding response — even if the origin server's response could be stored.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait CacheControl
trait Header
class Object
trait Matchable
class Any
Show all
Self type
NoStore.type
case object NoTransform extends CacheControl

The no-transform indicates that any intermediary (regardless of whether it implements a cache) shouldn't transform the response/request contents.

The no-transform indicates that any intermediary (regardless of whether it implements a cache) shouldn't transform the response/request contents.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait CacheControl
trait Header
class Object
trait Matchable
class Any
Show all
Self type
case object OnlyIfCached extends CacheControl

The client indicates that cache should obtain an already-cached response. If a cache has stored a response, it's reused.

The client indicates that cache should obtain an already-cached response. If a cache has stored a response, it's reused.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait CacheControl
trait Header
class Object
trait Matchable
class Any
Show all
Self type
case object Private extends CacheControl

The private response directive indicates that the response can be stored only in a private cache

The private response directive indicates that the response can be stored only in a private cache

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait CacheControl
trait Header
class Object
trait Matchable
class Any
Show all
Self type
Private.type
case object ProxyRevalidate extends CacheControl

The proxy-revalidate response directive is the equivalent of must-revalidate, but specifically for shared caches only.

The proxy-revalidate response directive is the equivalent of must-revalidate, but specifically for shared caches only.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait CacheControl
trait Header
class Object
trait Matchable
class Any
Show all
Self type
case object Public extends CacheControl

The public response directive indicates that the response can be stored in a shared cache.

The public response directive indicates that the response can be stored in a shared cache.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait CacheControl
trait Header
class Object
trait Matchable
class Any
Show all
Self type
Public.type
final case class SMaxAge(freshForSeconds: Int) extends CacheControl

The s-maxage response directive also indicates how long the response is fresh for (similar to max-age) — but it is specific to shared caches, and they will ignore max-age when it is present.

The s-maxage response directive also indicates how long the response is fresh for (similar to max-age) — but it is specific to shared caches, and they will ignore max-age when it is present.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait CacheControl
trait Header
class Object
trait Matchable
class Any
Show all
final case class StaleIfError(seconds: Int) extends CacheControl

The stale-if-error response directive indicates that the cache can reuse a stale response when an origin server responds with an error (500, 502, 503, or 504).

The stale-if-error response directive indicates that the cache can reuse a stale response when an origin server responds with an error (500, 502, 503, or 504).

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait CacheControl
trait Header
class Object
trait Matchable
class Any
Show all
final case class StaleWhileRevalidate(seconds: Int) extends CacheControl

The stale-while-revalidate response directive indicates that the cache could reuse a stale response while it revalidates it to a cache.

The stale-while-revalidate response directive indicates that the cache could reuse a stale response while it revalidates it to a cache.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait CacheControl
trait Header
class Object
trait Matchable
class Any
Show all

Types

override type HeaderValue = CacheControl

Inherited types

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

override def name: String

Attributes

Definition Classes
def parse(value: String): Either[String, CacheControl]
def render(value: CacheControl): String