Class

play.api.cache

CachedBuilder

Related Doc: package cache

Permalink

final class CachedBuilder extends AnyRef

Builds an action with caching behavior. Typically created with one of the methods in the Cached class. Uses both server and client caches:

Source
Cached.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CachedBuilder
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CachedBuilder(cache: AsyncCacheApi, key: (RequestHeader) ⇒ String, caching: PartialFunction[ResponseHeader, Duration])(implicit materializer: Materializer)

    Permalink

    cache

    The cache used for caching results

    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: 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 apply(action: EssentialAction): EssentialAction

    Permalink

    Compose the cache with an action

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def build(action: EssentialAction): EssentialAction

    Permalink

    Compose the cache with an action

  7. def clone(): AnyRef

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

    Permalink

    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

  9. def default(duration: Int): CachedBuilder

    Permalink

    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

  10. def default(duration: Duration): CachedBuilder

    Permalink

    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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. def includeStatus(status: Int, duration: Duration): CachedBuilder

    Permalink

    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

  17. def includeStatus(status: Int, duration: Int): CachedBuilder

    Permalink

    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

  18. def includeStatus(status: Int): CachedBuilder

    Permalink

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

  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean

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

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

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

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

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

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped