Packages
closex
0.4.0
2.1.0
2.0.1
2.0.0
1.4.7
1.4.6
1.4.5
1.4.4
1.4.3
1.4.2
1.4.1
1.4.0
1.3.0
1.2.0
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.5
1.0.4
1.0.3
1.0.2
1.0.0
0.9.0
0.8.3
0.8.2
0.8.1
0.8.0
0.7.0
0.6.0
0.5.14
0.5.13
0.5.12
0.5.11
0.5.10
0.5.9
0.5.8
0.5.7
0.5.6
0.5.5
0.5.4
0.5.3
0.5.2
0.5.1
0.5.0
0.4.1
0.4.0
0.3.0
0.2.0
0.1.0
Close.io HTTP client for Elixir
Current section
Files
Jump to
Current section
Files
lib/closex/application.ex
defmodule Closex.Application do
@moduledoc false
use Application
# TODO: make this ttl configurable
@default_ttl :timer.seconds(15)
def start(_type, _args) do
cachex_child_spec = %{
id: :closex_cache,
start: {Cachex, :start_link, [:closex_cache, [default_ttl: @default_ttl]]},
}
children = [
cachex_child_spec
]
opts = [strategy: :one_for_one, name: Closex.Supervisor]
Supervisor.start_link(children, opts)
end
end