memcachex v0.4.1 Memcache.Coder behaviour

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.

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

Callbacks

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

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

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

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