Packages
vela_cache
0.1.0
A distributed cache library for Elixir with pluggable backends, topologies, and near-cache support.
Current section
Files
Jump to
Current section
Files
lib/vela/serializer/behaviour.ex
defmodule Vela.Serializer do
@moduledoc """
Behaviour for serializing cache entries to/from binary.
Used by backends that store data externally (Redis, DETS)
where Elixir terms need to be converted to bytes.
"""
@callback encode(term(), keyword()) :: {:ok, binary()} | {:error, term()}
@callback decode(binary(), keyword()) :: {:ok, term()} | {:error, term()}
end