Rivet.Email.Example.Mailer.Configurator (rivet_email v2.5.0)

View Source

Summary

Functions

Returns a specification to start this module under a supervisor.

Delete everything in the cache.

Delete anything by its key.

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

Retrieve anything by its key.

Obtain the number of elements stored 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()

Delete everything in the cache.

Returns a boolean indicating if cache has been correctly cleared.

delete(key)

Delete anything by its key.

Returns a boolean indicating if element has been correctly deleted.

get(name)

insert(key, value, keepAliveInMillis \\ :keep_alive_forever)

@spec insert(any(), any(), number() | atom()) :: boolean() | {:error, String.t()}

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

Returns a boolean indicating if element has been correctly inserted.

lookup(key)

Retrieve anything by its key.

Returns [{your_stored_tuple}].

purge_cache()

size()

Obtain the number of elements stored in the cache.

Returns an integer equals or bigger than zero.

start_link(_)

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

Returns {:ok, PID}.