Plug.Session.ETS
Stores the session in an in-memory ETS table.
This store does not create the ETS table; it expects that an existing named table with public properties is passed as an argument.
Options
:table
- ETS table name (required)
For more information on ETS tables, visit the Erlang documentation at http://www.erlang.org/doc/man/ets.html.
Examples
# Create an ETS table when the application starts
:ets.new(:session, [:named_table, :public, read_concurrency: true])
# Use the session plug with the table name
plug Plug.Session, store: :ets, key: "sid", table: :session
Summary↑
delete(conn, sid, table) | Callback implementation for |
get(conn, sid, table) | Callback implementation for |
init(opts) | Callback implementation for |
put(conn, sid, data, table) | Callback implementation for |
Functions
Callback implementation for Plug.Session.Store.delete/3
.
Callback implementation for Plug.Session.Store.get/3
.
Callback implementation for Plug.Session.Store.init/1
.
Callback implementation for Plug.Session.Store.put/4
.