cc.spray.caching

LruCache

class LruCache [V] extends Cache[V]

A last-recently-used cache with a defined capacity and time-to-live. The {{dropFraction}} parameter is used for evicting items from the cache when the maximum capacity is reached. E.g. with a {{maxEntries}} value of 100 and a {{dropFraction}} of 0.20 the cache will evict the oldest 20 cache entries when the 101st entry is about to be stored.

Self Type
LruCache[V]
Linear Supertypes
Cache[V], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. LruCache
  2. Cache
  3. AnyRef
  4. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new LruCache (maxEntries: Int, dropFraction: Double, ttl: Duration)

Type Members

  1. class Entry extends AnyRef

  2. class Key extends AnyRef

  3. class Store extends LinkedHashMap[Any, Entry]

    Attributes
    protected

Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. def apply (key: Any): Key

    Selects the (pontentially non-existing) cache entry with the given key.

    Selects the (pontentially non-existing) cache entry with the given key.

    Definition Classes
    Cache
  7. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  8. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  9. val dropFraction : Double

  10. def eq (arg0: AnyRef): Boolean

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

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

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. def fromFuture (key: Any)(future: ⇒ Future[V]): Future[V]

    Supplies a cache entry for the given key from the given expression.

    Supplies a cache entry for the given key from the given expression.

    Definition Classes
    LruCacheCache
  14. def get (key: Any): Option[Future[V]]

    Retrieves the future instance that is currently in the cache for the given key.

    Retrieves the future instance that is currently in the cache for the given key. Returns None if the key has no corresponding cache entry.

    Definition Classes
    LruCacheCache
  15. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef
  16. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  17. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  18. val maxEntries : Int

  19. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  20. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  21. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  22. val store : Store

    Attributes
    protected[caching]
  23. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  24. def toString (): String

    Definition Classes
    AnyRef → Any
  25. val ttl : Duration

  26. def wait (): Unit

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Cache[V]

Inherited from AnyRef

Inherited from Any