application.ex (359B)
1 defmodule Plug.Crypto.Application do 2 use Application 3 4 def start(_, _) do 5 children = [ 6 {Agent, &start_crypto_keys/0} 7 ] 8 9 Supervisor.start_link(children, strategy: :one_for_one, name: __MODULE__) 10 end 11 12 defp start_crypto_keys do 13 Plug.Crypto.Keys = :ets.new(Plug.Crypto.Keys, [:named_table, :public, read_concurrency: true]) 14 end 15 end