class FreshnessCalculator extends AnyRef
- Alphabetic
- By Inheritance
- FreshnessCalculator
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- def calculateFreshnessFromExpires(request: CacheRequest, response: CacheResponse): Option[Seconds]
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
- def calculateFreshnessFromHeuristic(request: CacheRequest, response: CacheResponse): Option[Seconds]
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
- def calculateFreshnessFromMaxAge(request: CacheRequest, response: CacheResponse): Option[Seconds]
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
- def calculateFreshnessFromSMaxAge(request: CacheRequest, response: CacheResponse): Option[Seconds]
Calculates the freshness lifetime from the s-maxage cache directive, if the cache is shared.
- def calculateFreshnessLifetime(request: CacheRequest, response: CacheResponse): Seconds
Returns the freshness lifetime in seconds.
Returns the freshness lifetime in seconds.
https://tools.ietf.org/html/rfc7234#section-4.2.1
- def isFreshnessInformationInvalid(request: CacheRequest, response: CacheResponse): Boolean
Returns true if the freshness information is invalid, false otherwise.
- def unapplySeq(directives: Seq[CacheDirective]): Option[Seconds]