Object

scalacache

sync

Related Doc: package scalacache

Permalink

object sync

Synchronous API, for the case when you don't want to deal with Futures.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. sync
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def caching[V, Repr](keyParts: Any*)(f: ⇒ V)(implicit scalaCache: ScalaCache[Repr], flags: Flags, codec: Codec[V, Repr]): V

    Permalink

    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

  6. def cachingForMemoize[V, Repr](key: String)(optionalTtl: Option[Duration])(f: ⇒ V)(implicit scalaCache: ScalaCache[Repr], flags: Flags, codec: Codec[V, Repr]): V

    Permalink
  7. def cachingWithOptionalTTL[V, Repr](keyParts: Any*)(optionalTtl: Option[Duration])(f: ⇒ V)(implicit scalaCache: ScalaCache[Repr], flags: Flags, codec: Codec[V, Repr]): V

    Permalink

    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

  8. def cachingWithTTL[V, Repr](keyParts: Any*)(ttl: Duration)(f: ⇒ V)(implicit scalaCache: ScalaCache[Repr], flags: Flags, codec: Codec[V, Repr]): V

    Permalink

    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

  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def get[V, Repr](keyParts: Any*)(implicit scalaCache: ScalaCache[Repr], flags: Flags, codec: Codec[V, Repr]): Option[V]

    Permalink

    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

  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped