Expander v0.0.1 Expander.Cache.Adapter.Memcache View Source
An adapter that uses Memcache as a caching engine.
Example
# config/config.exs
config :sample, Sample.Expander,
adapter: Expander.Cache.Adapter.Memcache
# lib/sample/expander.ex
defmodule Sample.Expander do
use Expander.Expand, otp_app: :expander, adapter: Expander.Cache.Adapter.Memcache
end
Link to this section Summary
Functions
Get URL from cache
Set URL in cache
Connects to memcache to store data using provided config
Link to this section Functions
Link to this function
get(store, key)
View Source
get(Expander.Cache.Store.t, Expander.key) :: {:ok, Expander.Cache.Store.t, {:ok, Expander.value} | :error} | Expander.exception
Get URL from cache.
Callback implementation for Expander.Cache.Adapter.get/2.
Link to this function
set(store, key, value)
View Source
set(Expander.Cache.Store.t, Expander.key, Expander.value) :: {:ok, Expander.Cache.Store.t} | Expander.exception
Set URL in cache.
Callback implementation for Expander.Cache.Adapter.set/3.
Connects to memcache to store data using provided config.
Config
initial:A map of key/value pairs to ensure are set in memcached at boot.- Default:
%{}
- Default:
All other options are passed verbatim to Memcache.start_link/2.