c

play.api.cache

DefaultSyncCacheApi

class DefaultSyncCacheApi extends SyncCacheApi

A SyncCacheApi that wraps an AsyncCacheApi

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

Instance Constructors

  1. new DefaultSyncCacheApi(cacheApi: AsyncCacheApi)
    Annotations
    @Inject()

Value Members

  1. val cacheApi: AsyncCacheApi
  2. def get[T](key: String)(implicit arg0: ClassTag[T]): Option[T]

    Retrieve a value from the cache for the given type

    Retrieve a value from the cache for the given type

    key

    Item key.

    returns

    result as Option[T]

    Definition Classes
    SyncCacheApi
  3. def getOrElseUpdate[A](key: String, expiration: Duration)(orElse: => A)(implicit arg0: ClassTag[A]): A

    Retrieve a value from the cache, or set it from a default function.

    Retrieve a value from the cache, or set it from a default function.

    key

    Item key.

    expiration

    expiration period in seconds.

    orElse

    The default function to invoke if the value was not found in cache.

    Definition Classes
    SyncCacheApi
  4. def remove(key: String): Unit

    Remove a value from the cache

    Remove a value from the cache

    Definition Classes
    SyncCacheApi
  5. def set(key: String, value: Any, expiration: Duration): Unit

    Set a value into the cache.

    Set a value into the cache.

    key

    Item key.

    value

    Item value.

    expiration

    Expiration time.

    Definition Classes
    SyncCacheApi