class
LruCache
[V]
extends Cache[V]
Instance Constructors
-
new
LruCache
(maxEntries: Int, dropFraction: Double, ttl: Duration)
Type Members
-
class
Entry
extends AnyRef
-
class
Key
extends AnyRef
-
class
Store
extends LinkedHashMap[Any, Entry]
Value Members
-
def
!=
(arg0: AnyRef): Boolean
-
def
!=
(arg0: Any): Boolean
-
def
##
(): Int
-
def
==
(arg0: AnyRef): Boolean
-
def
==
(arg0: Any): Boolean
-
def
apply
(key: Any): Key
-
def
asInstanceOf
[T0]
: T0
-
def
clone
(): AnyRef
-
val
dropFraction
: Double
-
def
eq
(arg0: AnyRef): Boolean
-
def
equals
(arg0: Any): Boolean
-
def
finalize
(): Unit
-
def
fromFuture
(key: Any)(future: ⇒ Future[V]): Future[V]
-
def
get
(key: Any): Option[Future[V]]
-
def
getClass
(): java.lang.Class[_]
-
def
hashCode
(): Int
-
def
isInstanceOf
[T0]
: Boolean
-
val
maxEntries
: Int
-
def
ne
(arg0: AnyRef): Boolean
-
def
notify
(): Unit
-
def
notifyAll
(): Unit
-
val
store
: Store
-
def
synchronized
[T0]
(arg0: ⇒ T0): T0
-
def
toString
(): String
-
val
ttl
: Duration
-
def
wait
(): Unit
-
def
wait
(arg0: Long, arg1: Int): Unit
-
def
wait
(arg0: Long): Unit
Inherited from AnyRef
Inherited from Any
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.