philss /
floki
Floki is a simple HTML parser that enables search for nodes using CSS selectors.
88/100 healthLoading repository data…
ricardobcl / repository
A simple erlang in-memory cache
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
ets_cache is a very(!) simple, self-contained memory cache, using only ETS (Erlang Term Storage). You create a cache that has limit of maximum number of elements. When this limit is exceed, the oldest element is removed.
It has the following functions:
new (max_size) -> ets_cache()
destroy (ets_cache) -> true
put (ets_cache, key, value) -> true
put (ets_cache, key, value, timestamp) -> true
get (ets_cache, key) -> {ok, value} | not_found
get (ets_cache, key, timeout) -> {ok, value} | not_found | expired
It is design to perform rapidly:
get is constant O(1);put is logarithmic O(log(N));PS: For performance, a good rule is to use binaries as much as possible for representing strings and large blocks of untyped memory.
Ricardo Tomé Gonçalves tome.wave@gmail.com
% Creates a new cache with a maximum of 2 elements in cache
C = ets_cache:new(2),
% Add key/values
ets_cache:put(C, key1, v1),
ets_cache:put(C, key2, v2),
ets_cache:put(C, key3, v3),
ets_cache:put(C, key3, v33),
% Get values
not_found = ets_cache:get(C, key1),
{ok, v2} = ets_cache:get(C, key2),
{ok, v33} = ets_cache:get(C, key3),
expired = ets_cache:get(C, key3, 0),
$ erlc -DTEST ets_cache.erl; erl -eval "eunit:test(ets_cache)"
Selected from shared topics, language and repository description—not editorial ratings.
philss /
Floki is a simple HTML parser that enables search for nodes using CSS selectors.
88/100 healthsile /
A simple, terminal-based Erlang dashboard written in Rust
60/100 healthklarna /
ponos is a simple yet powerful load generator written in erlang
72/100 healthirrustible /
Simple, Erlang-inspired fault-tolerance framework for Rust Futures.
65/100 healthmrdimosthenis /
A simple and functional machine learning library for the Erlang ecosystem
74/100 healthnitrogen /
A simple, standardized interface library to Erlang HTTP Servers.
73/100 health