Packages

trait Cache[F[_], V] extends CacheAlg[F, V]

Linear Supertypes
CacheAlg[F, V], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Cache
  2. CacheAlg
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def caching(keyParts: Any*)(ttl: Option[Duration])(f: ⇒ V)(implicit flags: Flags): F[V]

    Get a value from the cache if it exists.

    Get a value from the cache if it exists. Otherwise compute it, insert it into the cache, and return it.

    keyParts

    The cache key

    ttl

    The time-to-live to use when inserting into the cache. The cache entry will expire after this time has elapsed.

    f

    A block that computes the value

    flags

    Flags used to conditionally alter the behaviour of ScalaCache

    returns

    The value, either retrieved from the cache or computed

    Definition Classes
    CacheAlg
  2. abstract def cachingF(keyParts: Any*)(ttl: Option[Duration])(f: F[V])(implicit flags: Flags): F[V]

    Get a value from the cache if it exists.

    Get a value from the cache if it exists. Otherwise compute it, insert it into the cache, and return it.

    keyParts

    The cache key

    ttl

    The time-to-live to use when inserting into the cache. The cache entry will expire after this time has elapsed.

    f

    A block that computes the value wrapped in a container

    flags

    Flags used to conditionally alter the behaviour of ScalaCache

    returns

    The value, either retrieved from the cache or computed

    Definition Classes
    CacheAlg
  3. abstract def cachingForMemoize(baseKey: String)(ttl: Option[Duration])(f: ⇒ V)(implicit flags: Flags): F[V]
  4. abstract def cachingForMemoizeF(baseKey: String)(ttl: Option[Duration])(f: F[V])(implicit flags: Flags): F[V]
  5. abstract def close: F[Unit]

    You should call this when you have finished using this Cache.

    You should call this when you have finished using this Cache. (e.g. when your application shuts down)

    It will take care of gracefully shutting down the underlying cache client.

    Note that you should not try to use this Cache instance after you have called this method.

    Definition Classes
    CacheAlg
  6. abstract def config: CacheConfig
  7. abstract def get(keyParts: Any*)(implicit flags: Flags): F[Option[V]]

    Get a value from the cache

    Get a value from the cache

    keyParts

    The cache key

    flags

    Flags used to conditionally alter the behaviour of ScalaCache

    returns

    The appropriate value, if it was found in the cache

    Definition Classes
    CacheAlg
  8. abstract def put(keyParts: Any*)(value: V, ttl: Option[Duration] = None)(implicit flags: Flags): F[Unit]

    Insert a value into the cache, optionally setting a TTL (time-to-live)

    Insert a value into the cache, optionally setting a TTL (time-to-live)

    keyParts

    The cache key

    value

    The value to insert

    ttl

    The time-to-live. The cache entry will expire after this time has elapsed.

    flags

    Flags used to conditionally alter the behaviour of ScalaCache

    Definition Classes
    CacheAlg
  9. abstract def remove(keyParts: Any*): F[Unit]

    Remove the given key and its associated value from the cache, if it exists.

    Remove the given key and its associated value from the cache, if it exists. If the key is not in the cache, do nothing.

    keyParts

    data to be used to generate the cache key. This could be as simple as just a single String. See CacheKeyBuilder.

    Definition Classes
    CacheAlg
  10. abstract def removeAll: F[Unit]

    Delete the entire contents of the cache.

    Delete the entire contents of the cache. Use wisely!

    Definition Classes
    CacheAlg

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  17. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from CacheAlg[F, V]

Inherited from AnyRef

Inherited from Any

Ungrouped