ExCache behaviour (ex_cache v0.1.1)

View Source

Documentation for ExCache.

Summary

Types

fallback()

@type fallback() :: (k() -> {:commit, v()} | {:ignore, v()})

k()

@type k() :: term()

name()

@type name() :: term()

put_opts()

@type put_opts() :: [{:ttl, pos_integer() | :infinity}]

t()

@type t() :: pid() | {atom(), node()} | ExCache.Typespecs.name()

v()

@type v() :: term() | nil

Callbacks

del(t, k)

@callback del(t(), k()) :: any()

get(t, k)

@callback get(t(), k()) :: v()

put(t, k, v, put_opts)

@callback put(t(), k(), v(), put_opts()) :: any()