# `Bandera.Notifications`

Cross-node cache-busting notifications.

When the `Bandera.Store.TwoLevel` store writes a flag, it calls
`publish_change/1`. If notifications are enabled, the configured adapter
broadcasts the change to all nodes; each node's notifier busts its local cache
entry for that flag (ignoring changes it published itself). Disabled by default.

    config :bandera,
      cache_bust_notifications: [
        enabled: true,
        adapter: Bandera.Notifications.Redis,
        redis: [host: "localhost", port: 6379]
      ]

# `publish_change`

```elixir
@callback publish_change(flag_name :: atom()) :: :ok | {:error, term()}
```

Broadcasts a flag change to other nodes so they bust their local cache entry.

# `unique_id`

```elixir
@callback unique_id() :: String.t()
```

Returns this node's stable per-node id, used to ignore self-published changes.

# `publish_change`

```elixir
@spec publish_change(atom()) :: :ok | {:error, term()}
```

Publish a flag change to other nodes (no-op when notifications are disabled, best-effort when enabled).

---

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