OTP Application callback module for SuperCache.
Starts the core supervision tree, which includes:
SuperCache.Config— central configuration storeSuperCache.Sup— dynamic supervisor for user-spawned workersSuperCache.Partition.Holder— partition registrySuperCache.EtsHolder— ETS table lifecycle managerSuperCache.Cluster.Manager— cluster membership & partition mappingSuperCache.Cluster.NodeMonitor— node connectivity watcherSuperCache.Cluster.TxnRegistry— 3PC transaction logSuperCache.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"]