LruCache

org.specs2.data.LruCache
class LruCache[A](maxSize: Int, systemTime: SystemTime = ...)

LRU (least recently used) cache for processing items Values can be registered and the cached cleaned so that it doesn't go above a given size. The oldest elements are removed first.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def oldestTimestamp: Long

Return the timestamp for the oldest element

Return the timestamp for the oldest element

Attributes

Checks if a value has already been processed; if not immediately adds it to the cache. If it has been processed, refresh its timestamp.

Checks if a value has already been processed; if not immediately adds it to the cache. If it has been processed, refresh its timestamp.

Attributes

Returns

the processed status

def size: Int

Return the number of elements in the cache

Return the number of elements in the cache

Attributes