module Lru: Cache.Strategy
with type 'a with_init_args = int -> 'a
Least recently used.
type 'a
t
type 'a
with_init_args
This type is used to specify the signature of
cps_create
. For instance
if
cps_create
takes two arguments of types
x
and
y
:
type 'a with_init_args : x -> y -> 'a
val cps_create : f:('a t -> 'b) -> 'b with_init_args
cps_create ~f
is given in CPS form to enable chaining. (i.e. instead of
directly returning a value it applies f to this value).
val touch : 'a t -> 'a -> 'a list
Marks an element as "fresh". Returns a list of elements to be dropped from
the store.
val remove : 'a t -> 'a -> unit
Informs the strategy that an element was removed from the store.
val clear : 'a t -> unit
Inform the strategy that all the elements where dropped from the store.