FerricStore.Macro (ferricstore v0.3.7)

Copy Markdown View Source

Generates the full FerricStore public API (get, set, del, hash, set, list, sorted set, probabilistic, etc.) for use FerricStore modules.

Summary

Functions

Generates all FerricStore API functions for a module.

Functions

__using__(opts)

(macro)

Generates all FerricStore API functions for a module.

Each generated function resolves the instance context via __instance__/0 and delegates to FerricStore.Impl.

Usage:

defmodule MyApp.Cache do
  use FerricStore,
    data_dir: "/data/cache",
    shard_count: 4
end

MyApp.Cache.set("key", "value")
{:ok, "value"} = MyApp.Cache.get("key")