Packages
cache_worker
0.1.0
Defines a behavior to be implemented for managing data that should be held in the VM and periodically refreshed.
Current section
Files
Jump to
Current section
Files
lib/test_worker.ex
defmodule TestWorker do
@moduledoc """
A simple cache worker for testing with
"""
use CacheWorker, bucket: :test_worker
def init(_) do
{:ok, %{seeded: "on init"}}
end
def load(:crash) do
raise "AAAAAAHHHHH"
end
def load(input) do
{:ok, "The value for #{input}"}
end
end