Memcachir
Memcached client for Elixir
Installation
defp deps() do
...
{:memcachir, "~> 0.1.0"},
...
end
defp application() do
[applications: [:logger, :memcachir, ...]]
end
config :memcachir,
hostname: "localhost"
Configuration
Complete configuration options with default values:
config :memcachir,
# connection options
hostname: "localhost",
port: 11211,
backoff_initial: 500,
backoff_max: 30_000,
# memcached options
ttl: 0,
namespace: nil,
coder: {Memcachir.Coder.Raw, []},
# connection pool options
strategy: :lifo,
size: 10,
max_overflow: 10
Example
iex> Memcachir.set("hello", "world")
{:ok}
iex> Memcachir.get("hello")
{:ok, "world"}
See test folder for further examples.