Rivet.Ident.Example.Mailer.Configurator (rivet_ident v4.0.0)

Copy Markdown View Source

Summary

Functions

Returns a specification to start this module under a supervisor.

Return the value of a key in an idiomatic tuple

Similar to get, but call a function to lookup the value if it isn't in the cache.

Store anything for a certain amount of time or forever if no keep alive time specified

Retrieve anything by its key using the raw :ets.lookup call. less idiomatic than get, but includes rescue for unexpected results that raise an error, instead turning it into :error after logging the reason.

Count of items in the cache.

Start scheduling the works for clearing the cache. This method should be called before performing any operation.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

clear()

conf(grp, key, site \\ "")

conf!(grp, key, site \\ "")

delete(key)

get(key)

Return the value of a key in an idiomatic tuple

get_through(key, func)

Similar to get, but call a function to lookup the value if it isn't in the cache.

insert(key, value, keepalive \\ :infinity)

@spec insert(any(), any(), pos_integer() | :infinity) :: true | {:error, String.t()}

Store anything for a certain amount of time or forever if no keep alive time specified

load_site(site)

lookup(key)

Retrieve anything by its key using the raw :ets.lookup call. less idiomatic than get, but includes rescue for unexpected results that raise an error, instead turning it into :error after logging the reason.

size()

Count of items in the cache.

start_link(_)

Start scheduling the works for clearing the cache. This method should be called before performing any operation.

Returns {:ok, PID}.