Caching

org.http4s.server.middleware.Caching$
object Caching

Caching contains middlewares to support caching functionality.

Helper functions to support Caching.cache can be found in Caching.Helpers

Attributes

Source:
Caching.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Caching.type

Members list

Concise view

Type members

Classlikes

object Helpers

Helpers Contains the default arguments used to help construct middleware with caching. They serve to support the default arguments for publicCache and privateCache.

Helpers Contains the default arguments used to help construct middleware with caching. They serve to support the default arguments for publicCache and privateCache.

Attributes

Source:
Caching.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Helpers.type

Attributes

Source:
Caching.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Attributes

Source:
Caching.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def cache[G[_] : Temporal, F[_]](lifetime: Duration, isPublic: Either[public.type, `private`], methodToSetOn: Method => Boolean, statusToSetOn: Status => Boolean, http: Http[G, F]): Http[G, F]

Construct a Middleware that will apply the appropriate caching headers.

Construct a Middleware that will apply the appropriate caching headers.

Helper functions for methodToSetOn and statusToSetOn can be found in Helpers.

Note: If set to Duration.Inf, lifetime falls back to 10 years for support of Http1 caches.

Attributes

Source:
Caching.scala
def cacheResponse[G[_]](lifetime: Duration, isPublic: Either[public.type, `private`]): PartiallyAppliedCache[G]

Method in order to turn a generated Response into one that will be appropriately cached.

Method in order to turn a generated Response into one that will be appropriately cached.

Note: If set to Duration.Inf, lifetime falls back to 10 years for support of Http1 caches.

Attributes

Source:
Caching.scala
def no-store[G[_] : Temporal, F[_], A](http: Kleisli[G, A, Response[F]]): Kleisli[G, A, Response[F]]

Middleware that implies responses should NOT be cached. This is a best attempt, many implementors of caching have done so differently.

Middleware that implies responses should NOT be cached. This is a best attempt, many implementors of caching have done so differently.

Attributes

Source:
Caching.scala

Transform a Response so that it will not be cached.

Transform a Response so that it will not be cached.

Attributes

Source:
Caching.scala
def privateCache[G[_] : Temporal, F[_]](lifetime: Duration, http: Http[G, F], fieldNames: List[CIString]): Http[G, F]

Sets headers for response to be privately cached for the specified duration.

Sets headers for response to be privately cached for the specified duration.

Note: If set to Duration.Inf, lifetime falls back to 10 years for support of Http1 caches.

Attributes

Source:
Caching.scala
def privateCacheResponse[G[_]](lifetime: Duration, fieldNames: List[CIString]): PartiallyAppliedCache[G]

Privately Caches A Response for the given lifetime.

Privately Caches A Response for the given lifetime.

Note: If set to Duration.Inf, lifetime falls back to 10 years for support of Http1 caches.

Attributes

Source:
Caching.scala
def publicCache[G[_] : Temporal, F[_]](lifetime: Duration, http: Http[G, F]): Http[G, F]

Sets headers for response to be publicly cached for the specified duration.

Sets headers for response to be publicly cached for the specified duration.

Note: If set to Duration.Inf, lifetime falls back to 10 years for support of Http1 caches.

Attributes

Source:
Caching.scala

Publicly Cache a Response for the given lifetime.

Publicly Cache a Response for the given lifetime.

Note: If set to Duration.Inf, lifetime falls back to 10 years for support of Http1 caches.

Attributes

Source:
Caching.scala