object sync
Synchronous API, for the case when you don't want to deal with Futures.
- Alphabetic
- By Inheritance
- sync
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
caching[V, Repr](keyParts: Any*)(f: ⇒ V)(implicit scalaCache: ScalaCache[Repr], flags: Flags, codec: Codec[V, Repr]): V
Wrap the given block with a caching decorator.
Wrap the given block with a caching decorator. First look in the cache. If the value is found, then return it immediately. Otherwise run the block and save the result in the cache before returning it.
Note: Because no TTL is specified, the result will be stored in the cache indefinitely.
Warning: may block indefinitely!
- V
the type of the block's result
- keyParts
data to be used to generate the cache key. This could be as simple as just a single String. See CacheKeyBuilder.
- f
the block to run
- returns
the result, either retrived from the cache or returned by the block
- def cachingForMemoize[V, Repr](key: String)(optionalTtl: Option[Duration])(f: ⇒ V)(implicit scalaCache: ScalaCache[Repr], flags: Flags, codec: Codec[V, Repr]): V
-
def
cachingWithOptionalTTL[V, Repr](keyParts: Any*)(optionalTtl: Option[Duration])(f: ⇒ V)(implicit scalaCache: ScalaCache[Repr], flags: Flags, codec: Codec[V, Repr]): V
Wrap the given block with a caching decorator.
Wrap the given block with a caching decorator. First look in the cache. If the value is found, then return it immediately. Otherwise run the block and save the result in the cache before returning it.
The result will be stored in the cache until the given TTL expires.
- V
the type of the block's result
- keyParts
data to be used to generate the cache key. This could be as simple as just a single String. See CacheKeyBuilder.
- optionalTtl
Optional Time To Live
- f
the block to run
- returns
the result, either retrived from the cache or returned by the block
-
def
cachingWithTTL[V, Repr](keyParts: Any*)(ttl: Duration)(f: ⇒ V)(implicit scalaCache: ScalaCache[Repr], flags: Flags, codec: Codec[V, Repr]): V
Wrap the given block with a caching decorator.
Wrap the given block with a caching decorator. First look in the cache. If the value is found, then return it immediately. Otherwise run the block and save the result in the cache before returning it.
The result will be stored in the cache until the given TTL expires.
- V
the type of the block's result
- keyParts
data to be used to generate the cache key. This could be as simple as just a single String. See CacheKeyBuilder.
- ttl
Time To Live
- f
the block to run
- returns
the result, either retrived from the cache or returned by the block
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
get[V, Repr](keyParts: Any*)(implicit scalaCache: ScalaCache[Repr], flags: Flags, codec: Codec[V, Repr]): Option[V]
Convenience method to get a value from the cache synchronously.
Convenience method to get a value from the cache synchronously.
Warning: may block indefinitely!
- V
the type of the corresponding value
- keyParts
data to be used to generate the cache key. This could be as simple as just a single String. See CacheKeyBuilder.
- returns
the value, if there is one
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )