Packages

A distributed cache library for Elixir with pluggable backends, topologies, and near-cache support.

Current section

Files

Jump to
vela_cache lib vela application.ex
Raw

lib/vela/application.ex

defmodule Vela.Application do
@moduledoc false
use Application
@impl true
def start(_type, _args) do
children = [
# pg scope for cluster event broadcasting (OTP 23+)
%{id: :vela_pg, start: {:pg, :start_link, [:vela_pg]}},
{Registry, keys: :unique, name: Vela.Cache.Registry},
{DynamicSupervisor, name: Vela.Cache.DynamicSupervisor, strategy: :one_for_one},
# Global cluster monitor — shared across all cache instances
Vela.Distributed.Cluster
]
Supervisor.start_link(children, strategy: :one_for_one, name: Vela.Supervisor)
end
end