Class

play.api.libs.ws.ahc.cache

AhcHttpCache

Related Doc: package cache

Permalink

class AhcHttpCache extends CacheDefaults with Debug

Central HTTP cache. This keeps a cache of HTTP responses according to https://tools.ietf.org/html/rfc7234#section-2

The primary cache key consists of the request method and target URI. However, since HTTP caches in common use today are typically limited to caching responses to GET, many caches simply decline other methods and use only the URI as the primary cache key.

Linear Supertypes
Debug, AhcUtilities, CacheDefaults, com.typesafe.play.cachecontrol.Cache, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AhcHttpCache
  2. Debug
  3. AhcUtilities
  4. CacheDefaults
  5. Cache
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AhcHttpCache(underlying: Cache, heuristicsEnabled: Boolean = false)(implicit executionContext: ExecutionContext)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addDisconnectHeader(response: CacheableResponse): CacheableResponse

    Permalink
  5. def addRevalidationFailed(response: CacheableResponse): CacheableResponse

    Permalink
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def cacheResponse(request: Request, response: CacheableResponse): Unit

    Permalink

    Caches the response, stripping any headers marked as "not-cacheable".

  8. def cachingAction(request: Request, response: CacheableResponse): ResponseCachingAction

    Permalink
  9. def calculateCurrentAge(request: CacheRequest, response: StoredResponse, requestTime: DateTime, responseTime: DateTime): Seconds

    Permalink

    Calculates the current age of the stored response.

    Calculates the current age of the stored response.

    Attributes
    protected
  10. def calculateCurrentAge(request: Request, entry: ResponseEntry, requestTime: DateTime): Seconds

    Permalink

    Calculates the current age of the stored response.

  11. def calculateFreshnessFromHeuristic(request: CacheRequest, response: CacheResponse): Option[Seconds]

    Permalink
    Definition Classes
    AhcHttpCache → Cache
  12. def calculateFreshnessLifetime(request: Request, entry: ResponseEntry): Seconds

    Permalink

  13. def calculateSecondaryKeys(request: Request, response: Response): Option[Map[HeaderName, Seq[String]]]

    Permalink

    Calculates the secondary keys of the request.

  14. def calculateTimeToLive(request: Request, status: CacheableHttpResponseStatus, headers: CacheableHttpResponseHeaders): Option[DateTime]

    Permalink

    Calculates the time to live.

    Calculates the time to live. Currently hardcoded to 24 hours.

    Attributes
    protected
  15. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  16. def close(): Unit

    Permalink
  17. def containsMatchingHeaders(presentedHeaders: Map[HeaderName, Seq[String]], nominatedHeaders: Map[HeaderName, Seq[String]]): Boolean

    Permalink
    Definition Classes
    CacheDefaults → Cache
  18. def debug(bodyPart: HttpResponseBodyPart): String

    Permalink
    Definition Classes
    Debug
  19. def debug[T](ctx: FilterContext[T]): String

    Permalink
    Definition Classes
    Debug
  20. def debug[T](handler: AsyncHandler[T]): String

    Permalink
    Definition Classes
    Debug
  21. def debug(bodyParts: List[HttpResponseBodyPart]): String

    Permalink
    Definition Classes
    Debug
  22. def debug(responseHeaders: HttpResponseHeaders): String

    Permalink
    Definition Classes
    Debug
  23. def debug(responseStatus: HttpResponseStatus): String

    Permalink
    Definition Classes
    Debug
  24. def debug(response: Response): String

    Permalink
    Definition Classes
    Debug
  25. def debug(request: Request): String

    Permalink
    Definition Classes
    Debug
  26. def debug(cfg: AsyncHttpClientConfig): String

    Permalink
    Definition Classes
    Debug
  27. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  28. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  29. implicit val executionContext: ExecutionContext

    Permalink
  30. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  31. def freshenResponse(newHeaders: HttpHeaders, response: CacheableResponse): CacheableResponse

    Permalink

  32. def generateCacheRequest(request: Request): CacheRequest

    Permalink
    Attributes
    protected
  33. def generateCachedResponse(request: Request, entry: ResponseEntry, currentAge: Seconds, isFresh: Boolean): CacheableResponse

    Permalink

    Generates a response for the HTTP response with the appropriate headers.

  34. def generateOriginResponse(request: Request, status: Int, responseHeaders: HttpResponseHeaders): OriginResponse

    Permalink
    Attributes
    protected
  35. def generateStoredResponse(response: CacheableResponse, requestMethod: String, nominatedHeaders: Map[HeaderName, Seq[String]]): StoredResponse

    Permalink
    Attributes
    protected
  36. def get(key: EffectiveURIKey): Future[Option[ResponseEntry]]

    Permalink
  37. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  38. def getURI(response: CacheableResponse, headerName: String): Option[URI]

    Permalink

    Gets the effective URI of the response.

    Gets the effective URI of the response.

    Attributes
    protected
  39. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  40. def headersToMap(headers: HttpHeaders): TreeMap[String, Seq[String]]

    Permalink
    Definition Classes
    AhcUtilities
  41. def invalidateIfUnsafe(request: Request, response: CacheableResponse): Unit

    Permalink

    Invalidates the effective request URI if the method is unsafe.

  42. def invalidateKey(key: EffectiveURIKey): Unit

    Permalink

    Invalidates the key.

  43. def isCacheableExtension(extension: CacheDirectiveExtension): Boolean

    Permalink
    Definition Classes
    AhcHttpCache → CacheDefaults → Cache
  44. def isCacheableMethod(requestMethod: String): Boolean

    Permalink
    Definition Classes
    CacheDefaults → Cache
  45. def isDefaultCacheable(statusCode: Int): Boolean

    Permalink
    Definition Classes
    CacheDefaults → Cache
  46. def isError(response: CacheableResponse): Boolean

    Permalink
  47. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  48. def isNonErrorResponse(response: CacheableResponse): Boolean

    Permalink
    Attributes
    protected
  49. def isNotModified(response: CacheableResponse): Boolean

    Permalink
  50. def isShared: Boolean

    Permalink

    Cache is not shared.

    Cache is not shared.

    Definition Classes
    AhcHttpCache → Cache
  51. def isUncachedResponse(any: Any): Boolean

    Permalink

  52. def isUnderstoodStatusCode(statusCode: Int): Boolean

    Permalink
    Definition Classes
    CacheDefaults → Cache
  53. def isUnsafeMethod(request: Request): Boolean

    Permalink
  54. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  55. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  56. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  57. def put(key: EffectiveURIKey, entry: ResponseEntry): Future[Unit]

    Permalink
  58. def remove(key: EffectiveURIKey): Future[Unit]

    Permalink
  59. def replaceHeaders(response: CacheableResponse)(block: (HttpHeaders) ⇒ HttpHeaders): CacheableResponse

    Permalink
  60. def selectionAction(request: Request, entries: Seq[ResponseEntry]): ResponseSelectionAction

    Permalink
  61. def serveAction(request: Request, entry: ResponseEntry, currentAge: Seconds): ResponseServeAction

    Permalink
  62. def stripHeaders(request: Request, httpResponse: CacheableResponse): CacheableResponse

    Permalink

    Strips headers using a strip headers cache-control calculator.

    Strips headers using a strip headers cache-control calculator.

    Attributes
    protected
  63. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  64. def toString(): String

    Permalink
    Definition Classes
    AhcHttpCache → AnyRef → Any
  65. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  66. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  67. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Debug

Inherited from AhcUtilities

Inherited from CacheDefaults

Inherited from com.typesafe.play.cachecontrol.Cache

Inherited from AnyRef

Inherited from Any

Ungrouped