implements a fixed-size LRU cache
Repository Hex Documentation Download
Copyright (c) 2016 Benoît Chesneau.
Version: 2.3.1.
Erlang LRU implements a fixed size LRU cache.
The cache is maintained in a process that could be added to a supervision tree.
Its usage is very simple.
Size = 128,
{ok, Cache} = lru:start({max_objs, Size}),
lru:add(Cache, 1, 1),
lru:add(Cache, 2, 2),
lru:remove(Cache, 2),
...
Full doc is available in the lru
module.
$ rebar3 compile