LazyCache v0.1.0 LazyCache View Source

Documentation for LazyCache.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor

Delete everything in the cache

Delete anything by its key

Store anything forever

Store anything for a certain amount of time

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

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Delete everything in the cache.

Returns a boolean indicating if cache has been correctly cleared.

Delete anything by its key.

Returns a boolean indicating if element has been correctly deleted.

Store anything forever.

Returns a boolean indicating if element has been correctly inserted.

Link to this function insert(key, value, keepAliveInMillis) View Source

Store anything for a certain amount of time.

Returns a boolean indicating if element has been correctly inserted.

Retrieve anything by its key.

Returns [{your_stored_tuple}].

Obtain the number of elements stored in the cache.

Returns an integer equals or bigger than zero.

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

Returns {:ok, PID}.