Vaultx.Cache.Manager (Vaultx v0.7.0)

View Source

Cache manager that coordinates operations across multiple cache layers.

This GenServer manages the lifecycle and coordination of all cache layers, handles cache warming, cleanup, and provides a unified interface for cache operations.

Summary

Functions

Returns a specification to start this module under a supervisor.

Clears cache layers.

Deletes a value from all cache layers.

Gets a value from the cache layers.

Gets multiple values from cache.

Puts a value into the cache layers.

Puts multiple key-value pairs.

Starts the cache manager.

Warms the cache with preloaded data.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

clear(pattern \\ :all)

Clears cache layers.

delete(key)

Deletes a value from all cache layers.

get(key, opts \\ [])

Gets a value from the cache layers.

get_many(keys, opts \\ [])

Gets multiple values from cache.

put(key, value, opts \\ [])

Puts a value into the cache layers.

put_many(pairs, opts \\ [])

Puts multiple key-value pairs.

start_link(opts \\ [])

Starts the cache manager.

warm(pattern, preload_fn)

Warms the cache with preloaded data.