class DefaultSyncCacheApi extends SyncCacheApi
Ordering
- Alphabetic
- By Inheritance
Inherited
- DefaultSyncCacheApi
- SyncCacheApi
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- new DefaultSyncCacheApi(cacheApi: AsyncCacheApi)
- Annotations
- @Inject()
Value Members
- val cacheApi: AsyncCacheApi
- 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
- 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
- def remove(key: String): Unit
Remove a value from the cache
Remove a value from the cache
- Definition Classes
- → SyncCacheApi
- 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
A SyncCacheApi that wraps an AsyncCacheApi