Operate v0.1.0-beta.4 Operate.Cache.ConCache View Source
Cache module implementing an ETS based cache, using ConCache.
To enable this cache, ConCache needs to be started from a supervisor:
children = [
{Operate, [
cache: Operate.Cache.ConCache,
]},
{ConCache, [
name: :operate,
ttl_check_interval: :timer.minutes(1),
global_ttl: :timer.minutes(10),
touch_on_read: true
]}
]
Supervisor.start_link(children, strategy: :one_for_one)
Link to this section Summary
Functions
Loads Ops from the cache by the given procedure referneces, or delegates
the job to the specified adapter. Returns the result in an :ok
/ :error
tuple pair.
As c:fetch_ops/3
, but returns the result or raises an exception.
Loads a transaction from the cache by the given txid, or delegates to job to
the specified adapter. Returns the result in an :ok
/ :error
tuple pair.
As c:fetch_tx/3
, but returns the transaction or raises an exception.
Link to this section Functions
Loads Ops from the cache by the given procedure referneces, or delegates
the job to the specified adapter. Returns the result in an :ok
/ :error
tuple pair.
Callback implementation for Operate.Cache.fetch_ops/3
.
As c:fetch_ops/3
, but returns the result or raises an exception.
Callback implementation for Operate.Cache.fetch_ops!/3
.
Loads a transaction from the cache by the given txid, or delegates to job to
the specified adapter. Returns the result in an :ok
/ :error
tuple pair.
Callback implementation for Operate.Cache.fetch_tx/3
.
As c:fetch_tx/3
, but returns the transaction or raises an exception.
Callback implementation for Operate.Cache.fetch_tx!/3
.