Nebulex.Adapters.Mnesia (nebulex_mnesia_adapter v2.6.5)

View Source

This module implements a Nebulex cache adapter using Mnesia as the underlying storage mechanism. It provides functions for cache operations such as get, put, delete, and more, while also handling expiration of cache entries.

Options

  • :table - The name of the Mnesia table to use..

  • :cleanup_interval - The interval in milliseconds for cleaning up expired entries. Defaults to 1_000 * 60 * 60 * 6 (6 hours).

Example

defmodule MyApp.MnesiaCache do
  use Nebulex.Cache,
    otp_app: :my_app,
    adapter: Nebulex.Adapters.Mnesia
end

config :my_app, MyApp.MnesiaCache,
  table: :my_cache_table,
  cleanup_interval: 1_000 * 60 * 60 * 6