# `Bandera.Config`

Resolves all Bandera settings at RUNTIME and caches them in a `:persistent_term`
snapshot for cheap hot-path reads.

This module deliberately uses NO `Application.compile_env/3`. Every value is read
from `Application.get_env/3` and can be changed at runtime via `reload/0`, with no
dependency recompilation. (Fixes fun_with_flags#122.)

# `snapshot`

```elixir
@type snapshot() :: %{
  store: module(),
  cache_enabled?: boolean(),
  cache_ttl: non_neg_integer(),
  persistence_adapter: module(),
  persistence: keyword(),
  notifications_enabled?: boolean(),
  notifications_adapter: module(),
  notifications: keyword()
}
```

# `build_unique_id`

```elixir
@spec build_unique_id() :: String.t()
```

Generate a random per-node id used to ignore self-published change notifications.

# `cache_enabled?`

```elixir
@spec cache_enabled?() :: boolean()
```

Whether the read cache is enabled (default `true`).

# `cache_ttl`

```elixir
@spec cache_ttl() :: non_neg_integer()
```

Cache time-to-live in seconds (default `900`).

# `ecto_table_name`

```elixir
@spec ecto_table_name() :: String.t()
```

The SQL table name used by the Ecto adapter (default `"bandera_flags"`).

# `notifications`

```elixir
@spec notifications() :: keyword()
```

The full notifications keyword config (adapter plus adapter-specific options).

# `notifications_adapter`

```elixir
@spec notifications_adapter() :: module()
```

The notifications adapter module (default `Bandera.Notifications.Redis`).

# `notifications_enabled?`

```elixir
@spec notifications_enabled?() :: boolean()
```

Whether cross-node cache-busting notifications are enabled (default `false`).

# `persistence`

```elixir
@spec persistence() :: keyword()
```

The full persistence keyword config (adapter plus adapter-specific options).

# `persistence_adapter`

```elixir
@spec persistence_adapter() :: module()
```

The persistence adapter module (default `Bandera.Store.Persistent.Memory`).

# `reload`

```elixir
@spec reload() :: :ok
```

Re-read application env and rewrite the persistent_term snapshot.

# `snapshot`

```elixir
@spec snapshot() :: snapshot()
```

Return the current snapshot, seeding it lazily if not yet present.

# `store`

```elixir
@spec store() :: module()
```

The active store module (default `Bandera.Store.TwoLevel`).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
