Nebulex.Adapter behaviour (Nebulex v2.0.0) View Source
Specifies the minimal API required from adapters.
Link to this section Summary
Functions
RExecutes the function fun
passing as parameters the adapter and metadata
(from the init/1
callback) associated with the given cache name_or_pid
.
Callbacks
The callback invoked in case the adapter needs to inject code.
Initializes the adapter supervision tree by returning the children.
Link to this section Types
Link to this section Functions
Specs
RExecutes the function fun
passing as parameters the adapter and metadata
(from the init/1
callback) associated with the given cache name_or_pid
.
It expects a name or a PID representing the cache.
Link to this section Callbacks
Specs
__before_compile__(term(), env :: Macro.Env.t()) :: Macro.t()
The callback invoked in case the adapter needs to inject code.
Specs
init(config :: Keyword.t()) :: {:ok, :supervisor.child_spec(), adapter_meta()}
Initializes the adapter supervision tree by returning the children.