FragmentedKeys.CacheHandler.Memory (fragmented_keys v0.1.1)

Copy Markdown View Source

In-memory cache handler backed by an Agent. For testing and temporary caching.

Each new/0 call creates an independent cache instance.

Summary

Functions

Clear all cached values.

Create a new independent in-memory cache instance. Accepts Agent.start_link/2 options.

Stop the underlying Agent process.

Types

t()

@type t() :: %FragmentedKeys.CacheHandler.Memory{pid: pid()}

Functions

clear(memory)

Clear all cached values.

new(opts \\ [])

Create a new independent in-memory cache instance. Accepts Agent.start_link/2 options.

stop(memory)

Stop the underlying Agent process.