erllama_cache_ramfile_srv (erllama v0.1.0)
View SourceRAM-file tier server.
Identical mechanics to erllama_cache_disk_srv (same KVC framing,
same temp+datasync+link+fsync_dir publish protocol) — the only
difference is the root directory points at a tmpfs mount such as
/dev/shm so the bytes never touch a spinning disk. The tier
label ram_file is what the meta server records, which lets the
scheduler reason about durability separately from latency.
Implementation is a delegating wrapper; all real work lives in
erllama_cache_disk_srv.
Summary
Functions
-spec delete(atom(), erllama_cache:cache_key()) -> ok.
-spec load(atom(), erllama_cache:cache_key()) -> {ok, erllama_cache_kvc:info(), binary()} | miss | {error, term()}.
-spec save(atom(), erllama_cache_kvc:build_meta(), binary()) -> {ok, erllama_cache:cache_key(), binary(), non_neg_integer()} | {error, term()}.
-spec scan(atom()) -> [{erllama_cache:cache_key(), binary(), non_neg_integer()}].