SSL.SessionCache (ex_ssl v1.0.0-rc.9)

Copy Markdown View Source

Bounded, reusable, memory-only TLS 1.2 EMS session cache.

Summary

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

lookup(key, reference, server \\ __MODULE__)

@spec lookup(binary(), :auto | binary() | {binary(), binary()}, GenServer.server()) ::
  {:ok, SSL.TLS12Session.t()} | :miss

put(key, session, server \\ __MODULE__)

@spec put(binary(), SSL.TLS12Session.t(), GenServer.server()) ::
  :ok | {:error, atom()}

start_link(opts \\ [])

@spec start_link(keyword()) :: GenServer.on_start()

stats(server \\ __MODULE__)

@spec stats(GenServer.server()) ::
  %{count: non_neg_integer(), bytes: non_neg_integer()} | {:error, atom()}