IndieWeb.Cache (IndieWeb v0.0.49) View Source

Provides the generic interface for handling caching logic for the IndieWeb library.

Configuration

In order to change the underlying adapter used, set the :cache value in the :adapters to an module that implements the behavior of IndieWeb.Cache.Adapter. By default, Cachex by way of IndieWeb.Cache.Adapters.Cachex is used.

Link to this section Summary

Functions

Obtains an implementation of a IndieWeb.Cache.Adapter module.

Removes the value of key key from the adapter.

Fetches the value defined by key from the adapter; returning value if it doesn't exist.

Sets the key key with the value value to the adapter.

Link to this section Functions

Obtains an implementation of a IndieWeb.Cache.Adapter module.

Link to this function

delete(key, options \\ [])

View Source

Specs

delete(binary(), keyword()) :: :ok | :error

Removes the value of key key from the adapter.

Link to this function

get(key, default_value \\ nil, options \\ [])

View Source

Specs

get(binary(), any(), keyword()) :: any()

Fetches the value defined by key from the adapter; returning value if it doesn't exist.

Link to this function

set(key, value, set_options \\ [], options \\ [])

View Source

Specs

set(binary(), any(), keyword(), keyword()) :: :ok | :error

Sets the key key with the value value to the adapter.