SyncEhCacheApi

play.api.cache.ehcache.SyncEhCacheApi
class SyncEhCacheApi(val cache: Ehcache) extends SyncCacheApi

Attributes

Graph
Supertypes
trait SyncCacheApi
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def get[T](key: String)(implicit ct: ClassTag[T]): Option[T]

Retrieve a value from the cache for the given type

Retrieve a value from the cache for the given type

Value parameters

key

Item key.

Attributes

Returns

result as Option[T]

Definition Classes
override def getOrElseUpdate[A : ClassTag](key: String, expiration: Duration)(orElse: => 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.

Value parameters

expiration

expiration period in seconds.

key

Item key.

orElse

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

Attributes

Definition Classes
override def remove(key: String): Unit

Remove a value from the cache

Remove a value from the cache

Attributes

Definition Classes
override def set(key: String, value: Any, expiration: Duration): Unit

Set a value into the cache.

Set a value into the cache.

Value parameters

expiration

Expiration time.

key

Item key.

value

Item value.

Attributes

Definition Classes