kalevala v0.1.0 Kalevala.Cache behaviour View Source
GenServer for caching in game resources
Example
defmodule Kantele.World.Items do
use Kalevala.Cache
end
iex> Kalevala.Items.put("sammatti:sword", %Item{})
iex> Kalevala.Items.get("sammatti:sword")
%Item{}
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Get a value out of the cache
Get a list of all keys in a table
Put a new value into the cache
Callbacks
Called after the cache is booted
Link to this section Types
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Get a value out of the cache
Get a list of all keys in a table
Put a new value into the cache
Link to this section Callbacks
Called after the cache is booted
A chance to warm the cache before accepting outside updates.