OgEx.Cache.ETS (og_ex v0.1.0)

Copy Markdown View Source

In-memory cache used by default.

Summary

Functions

Returns a specification to start this module under a supervisor.

Retrieves an image directly from ETS, returning :error when absent.

Creates the concurrent-read ETS table owned by the cache process.

Inserts or replaces an encoded image in the ETS cache.

Starts the process that owns the named ETS image table.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

fetch(key)

Retrieves an image directly from ETS, returning :error when absent.

init(options)

Creates the concurrent-read ETS table owned by the cache process.

This is the GenServer initialization callback.

put(key, image)

Inserts or replaces an encoded image in the ETS cache.

start_link(options \\ [])

Starts the process that owns the named ETS image table.