cache_money v0.2.0 CacheMoney.Adapter behaviour

This module specifies the adapter API that an adapter is required to implement.

Link to this section Summary

Link to this section Types

Link to this type config()
config() :: map()
Link to this type expiry()
expiry() :: non_neg_integer()
Link to this type key()
key() :: any()
Link to this type value()
value() :: any()

Link to this section Callbacks

Link to this callback delete(config, key)
delete(config(), key()) :: {:ok, value()} | {:error, any()}
Link to this callback get(config, key)
get(config(), key()) :: {:ok, value()} | {:error, any()}
Link to this callback set(config, key, value)
set(config(), key(), value()) :: {:ok, value()} | {:error, any()}
Link to this callback set(config, key, value, expiry)
set(config(), key(), value(), expiry()) :: {:ok, value()} | {:error, any()}
Link to this callback start_link(config)
start_link(config()) :: config()