Idris2Doc : Data.LRUCache

Data.LRUCache

(source)
Least Recently Used (LRU) Cache

Reexports

importpublic Data.HashPSQ
importpublic Data.LRUCache.Internal

Definitions

empty : Nat->LRUCachekv
  Create an empty LRUCache of the given size.

Totality: total
Visibility: export
insert : Hashablek=>Ordk=>k->v->LRUCachekv->LRUCachekv
  Insert an element into the LRUCache.

Totality: total
Visibility: export
insertView : Hashablek=>Ordk=>k->v->LRUCachekv-> (Maybe (k, v), LRUCachekv)
  Insert an element into the LRUCache returning the evicted element if any.
When the logical clock reaches its maximum value and all values are
evicted Nothing is returned.

Totality: total
Visibility: export
lookup : Hashablek=>Ordk=>k->LRUCachekv->Maybe (v, LRUCachekv)
  Lookup an element in an LRUCache and mark it as the least recently accessed.

Totality: total
Visibility: export