View Source IdempotencyPlug.ETSStore (TestServer v0.1.1)

Module that defines an ETS store.

The ETS table data is not persisted and will be flushed on application restart. You should use the IdempotencyPlug.EctoStore or a custom IdempotencyPlug.Store type module for production.

examples

Examples

defmodule MyApp.Application do
  # ..

  def start(_type, _args) do
    children = [
      {IdempotencyPlug.RequestTracker, [
        store: {IdempotencyPlug.EctoStore, [table: MyAppWeb.RequestTrackerStore]}]}
      # ...
    ]

    Supervisor.start_link(children, strategy: :one_for_one, name: MyApp.Supervisor)
  end
end