View Source Plausible.Cache.Adapter (Plausible v0.0.1)

Interface for the underlying cache implementation. Currently: ConCache

Using the Adapter module directly, the user must ensure that the relevant processes are available to use, which is normally done via the child specification.

Summary

Functions

Link to this function

child_spec(name, child_id, opts \\ [])

View Source
@spec child_spec(atom(), atom(), Keyword.t()) :: Supervisor.child_spec()
@spec delete(atom(), any()) :: :ok
Link to this function

fetch(cache_name, key, fallback_fn)

View Source
@spec fetch(atom(), any(), (-> any())) :: any()
@spec get(atom(), any()) :: any()
Link to this function

get(cache_name, key, fallback_fn)

View Source
@spec get(atom(), any(), (-> any())) :: any()
@spec keys(atom()) :: Enumerable.t()
Link to this function

put(cache_name, key, value)

View Source
@spec put(atom(), any(), any()) :: any()
Link to this function

put_many(cache_name, items)

View Source
@spec put_many(atom(), [any()]) :: :ok
@spec size(atom()) :: non_neg_integer() | nil