# `SuperCache.Application`
[🔗](https://github.com/ohhi-vn/super_cache/blob/main/lib/application.ex#L1)

OTP Application callback module for SuperCache.

Starts the core supervision tree, which includes:
- `SuperCache.Config` — central configuration store
- `SuperCache.Sup` — dynamic supervisor for user-spawned workers
- `SuperCache.Partition.Holder` — partition registry
- `SuperCache.EtsHolder` — ETS table lifecycle manager
- `SuperCache.Cluster.Manager` — cluster membership & partition mapping
- `SuperCache.Cluster.NodeMonitor` — node connectivity watcher
- `SuperCache.Cluster.TxnRegistry` — 3PC transaction log
- `SuperCache.Cluster.Metrics` — observability counter store

## Auto-start

If `config :super_cache, auto_start: true` is set, the cache will
automatically start during application boot using all values from the
application environment.  Cluster peers listed under `:cluster_peers`
will also be connected.

## Example

    # config/config.exs
    config :super_cache,
      auto_start: true,
      key_pos: 0,
      partition_pos: 0,
      num_partition: 8,
      cluster_peers: [:"node2@127.0.0.1", :"node3@127.0.0.1"]

---

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