play.api.cache

Cached

case class Cached(key: (RequestHeader) ⇒ String, caching: PartialFunction[ResponseHeader, Duration]) extends Product with Serializable

Cache an action.

Uses both server and client caches:

key

Compute a key from the request header

caching

A callback to get the number of seconds to cache results for

Source
Cached.scala
Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Cached
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Cached(key: (RequestHeader) ⇒ String, caching: PartialFunction[ResponseHeader, Duration])

    key

    Compute a key from the request header

    caching

    A callback to get the number of seconds to cache results for

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def apply(action: EssentialAction)(implicit app: Application): EssentialAction

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def build(action: EssentialAction)(implicit app: Application): EssentialAction

    Compose the cache with an action

  9. val caching: PartialFunction[ResponseHeader, Duration]

    A callback to get the number of seconds to cache results for

  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def compose(alternative: PartialFunction[ResponseHeader, Duration]): Cached

    Compose the cache with new caching function

    Compose the cache with new caching function

    alternative

    a closure getting the reponseheader and returning the duration we should cache for

  12. def default(duration: Int): Cached

    The returned cache will store all responses whatever they may contain

    The returned cache will store all responses whatever they may contain

    duration

    the number of seconds we should store responses

  13. def default(duration: Duration): Cached

    The returned cache will store all responses whatever they may contain

    The returned cache will store all responses whatever they may contain

    duration

    how long we should store responses

  14. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  17. def includeStatus(status: Int, duration: Duration): Cached

    Whether this cache should cache the specified response if the status code match This method will cache the result for duration seconds

    Whether this cache should cache the specified response if the status code match This method will cache the result for duration seconds

    status

    the status code to check

    duration

    how long should we cache the result for

  18. def includeStatus(status: Int, duration: Int): Cached

    Whether this cache should cache the specified response if the status code match This method will cache the result for duration seconds

    Whether this cache should cache the specified response if the status code match This method will cache the result for duration seconds

    status

    the status code to check

    duration

    the number of seconds to cache the result for

  19. def includeStatus(status: Int): Cached

    Whether this cache should cache the specified response if the status code match This method will cache the result forever

  20. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  21. val key: (RequestHeader) ⇒ String

    Compute a key from the request header

  22. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  26. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped