module Lru:Least Recently Used cachesig..end
Simple LRU list for use in caching situations. The LRU is designed to
not blow up when the destructor throws an exception, but better not to
try...
type 'a lru
val create : int -> ('a -> unit) -> 'a lrucreate size destructor creates a new lru list that stores at most
size elements, and calls destructor on any element before it's kicked out
of the listval touch : 'a lru -> 'a -> unitval clear : 'a lru -> unitval size : 'a lru -> intval change_size : 'a lru -> int -> unitval in_cache : 'a -> 'a lru -> boolval memoize : ?destruct:('a -> unit) -> int -> ('b -> 'a) -> 'b lru * ('b -> 'a)