Packages

  • package root
    Definition Classes
    root
  • package play

    Play framework.

    Play framework.

    Play

    http://www.playframework.com

    Definition Classes
    root
  • package api

    Contains the public API for Scala developers.

    Contains the public API for Scala developers.

    Read configuration
    val poolSize = configuration.getInt("engine.pool.size")
    Use the logger
    Logger.info("Hello!")
    Define a Plugin
    class MyPlugin(app: Application) extends Plugin
    Create adhoc applications (for testing)
    val application = Application(new File("."), this.getClass.getClassloader, None, Play.Mode.DEV)
    Definition Classes
    play
  • package cache

    Contains the Cache access API.

    Contains the Cache access API.

    Definition Classes
    api
  • package caffeine
    Definition Classes
    cache
  • package ehcache
    Definition Classes
    cache
  • AsyncCacheApi
  • Cached
  • CachedBuilder
  • DefaultSyncCacheApi
  • SyncCacheApi

class Cached extends AnyRef

A helper to add caching to an Action.

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

Instance Constructors

  1. new Cached(cache: AsyncCacheApi)(implicit materializer: Materializer)
    Annotations
    @Inject()

Value Members

  1. def apply(key: (RequestHeader) => String, duration: Duration): CachedBuilder

    Cache an action.

    Cache an action.

    key

    Cache key

    duration

    Cache duration

  2. def apply(key: (RequestHeader) => String, duration: Int): CachedBuilder

    Cache an action.

    Cache an action.

    key

    Cache key

    duration

    Cache duration (in seconds)

  3. def apply(key: String): CachedBuilder

    Cache an action.

    Cache an action.

    key

    Cache key

  4. def apply(key: (RequestHeader) => String): CachedBuilder

    Cache an action.

    Cache an action.

    key

    Compute a key from the request header

  5. def apply(key: (RequestHeader) => String, caching: PartialFunction[ResponseHeader, Duration]): CachedBuilder

    Cache an action.

    Cache an action.

    key

    Compute a key from the request header

    caching

    Compute a cache duration from the resource header

  6. def empty(key: (RequestHeader) => String): CachedBuilder

    A cached instance caching nothing Useful for composition

  7. def everything(key: (RequestHeader) => String, duration: Duration): CachedBuilder

    Caches everything for the specified duration

  8. def everything(key: (RequestHeader) => String, duration: Int): CachedBuilder

    Caches everything for the specified seconds

  9. def everything(key: (RequestHeader) => String): CachedBuilder

    Caches everything, forever

  10. def status(key: (RequestHeader) => String, status: Int): CachedBuilder

    Caches the specified status forever

  11. def status(key: (RequestHeader) => String, status: Int, duration: Duration): CachedBuilder

    Caches the specified status, for the specified duration

  12. def status(key: (RequestHeader) => String, status: Int, duration: Int): CachedBuilder

    Caches the specified status, for the specified number of seconds