View Source ExKits.Cache (lib_oss v0.1.0)

simple cache framework

Summary

Types

@type fallback() :: (k() -> {:commit, v()} | {:ignore, v()})
@type k() :: term()
@type put_opts() :: [{:ttl, pos_integer() | :infinity}]
@type storage() :: ExKits.Cache.Storage.t()
@type v() :: term() | nil

Functions

@spec evict(storage(), k()) :: any()
Link to this function

fetch(storage, key, opts, fallback)

View Source
@spec fetch(storage(), k(), put_opts(), fallback()) :: v()