Helper.Cache (helper v1.0.1) View Source
Helper module to define a partitioned Nebulex Cache, that is Nebulex v2.0 compliant.
The minimal code for defining a cache is like so:
defmodule Helper.Examples.Cache do
@moduledoc false
use Helper.Cache,
otp_app: :helper_examples,
cache: Helper.Examples.UserCache
end
In addition to the above, the cache module (Helper.Examples.UserCache) should be added to the children list for automatic startup when the application is booted.
That is it! You can start performing get and put on the Cache.