8000 GitHub - mururu/fifocache: FIFO cache implementation in Erlang
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

mururu/fifocache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fifocache

Build Status hex.pm version

fifocache is a fixed size FIFO cache implementation (O(logN)) in Erlang.

FIFO cache is sometimes necessary.

Usage

1> Cache0 = fifocache:new(2).
{fifocache,#{},{array,2,0,undefined,10},2,0,false}
2> Cache1 = fifocache:push(key0, value0, Cache0).
3> Cache2 = fifocache:push(key1, value1, Cache1).
4> Cache3 = fifocache:push(key2, value2, Cache2).
5> fifocache:lookup(key2, Cache3).
value2
6> fifocache:lookup(key0, Cache3).
not_found

License

Apache License 2.0

About

FIFO cache implementation in Erlang

Resources

License

Stars

Watchers

Forks

Packages

No packages published
0