memcachex v0.5.0 Memcache.Coder behaviour View Source

Defines the Memcache.Coder behaviour. A list would be passed to both encode/2 and decode/2 callbacks. This value can be specified by the user. Defaults to [] incase it is not specified.

Link to this section Summary

Callbacks

Called after the value is loaded from the server. It can return any type.

Called before the value is sent to the server. It should return iodata.

Link to this section Callbacks

Link to this callback

decode(iodata, options) View Source
decode(iodata(), options :: Keyword.t()) :: any()

Called after the value is loaded from the server. It can return any type.

Link to this callback

encode(any, options) View Source
encode(any(), options :: Keyword.t()) :: iodata()

Called before the value is sent to the server. It should return iodata.