FreshnessCalculator

com.typesafe.play.cachecontrol.FreshnessCalculator
class FreshnessCalculator(cache: Cache)

Calculates freshness lifetime for a request.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

Returns the freshness duration as calculated from the Expires header.

Returns the freshness duration as calculated from the Expires header.

https://tools.ietf.org/html/rfc7234#section-4.2.1

Attributes

Returns the freshness lifetime from heuristics, or None if the response is stale.

Returns the freshness lifetime from heuristics, or None if the response is stale.

https://tools.ietf.org/html/rfc7234#section-4.2.2

Attributes

Returns the freshness duration as calculated from the Max-Age cache directive.

Returns the freshness duration as calculated from the Max-Age cache directive.

https://tools.ietf.org/html/rfc7234#section-4.2.1

Attributes

Calculates the freshness lifetime from the s-maxage cache directive, if the cache is shared.

Calculates the freshness lifetime from the s-maxage cache directive, if the cache is shared.

Attributes

Returns the freshness lifetime in seconds.

Returns the freshness lifetime in seconds.

https://tools.ietf.org/html/rfc7234#section-4.2.1

Attributes

def isFreshnessInformationInvalid(request: CacheRequest, response: CacheResponse): Boolean

Returns true if the freshness information is invalid, false otherwise.

Returns true if the freshness information is invalid, false otherwise.

Attributes

def unapplySeq(directives: Seq[CacheDirective]): Option[Seconds]