Nebulex.Adapter behaviour (Nebulex v2.0.0) View Source
Specifies the minimal API required from adapters.
Link to this section Summary
Link to this section Types
The metadata returned by the adapter
It must be a map and Nebulex itself will always inject two keys into the meta:
:cache- The cache module.
:pid- The PID returned by the child spec returned in
t() :: module()
Link to this section Functions
RExecutes the function
fun passing as parameters the adapter and metadata
init/1 callback) associated with the given cache
It expects a name or a PID representing the cache.
Link to this section Callbacks
The callback invoked in case the adapter needs to inject code.
Initializes the adapter supervision tree by returning the children.