You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the adapter encodes and decodes Redis keys and values automatically underneath, it encodes any Elixir term to a binary and decodes binaries into Elixir terms. The idea is to allow the user to optionally provide a custom codec with the option :codec. The value must be a module implementing the NebulexRedisAdapter.Codec behaviour.
This is how the behaviour may look like:
defmoduleNebulexRedisAdapter.Codecdo@moduledoc""" Codec interface. """@doc""" Encodes `key` with the given `opts`. """@callbackencode_key(key::term,opts::[term])::iodata@doc""" Encodes `value` with the given `opts`. """@callbackencode_value(value::term,opts::[term])::iodata@doc""" Decodes `key` with the given `opts`. """@callbackdecode_key(key::binary,opts::[term])::term@doc""" Decodes `value` with the given `opts`. """@callbackdecode_value(value::binary,opts::[term])::termend
The text was updated successfully, but these errors were encountered:
Currently, the adapter encodes and decodes Redis keys and values automatically underneath, it encodes any Elixir term to a binary and decodes binaries into Elixir terms. The idea is to allow the user to optionally provide a custom codec with the option
:codec
. The value must be a module implementing theNebulexRedisAdapter.Codec
behaviour.This is how the behaviour may look like:
The text was updated successfully, but these errors were encountered: