Cache-Pot is configured entirely through CLI flags or environment variables — there is no separate config file. Every flag has an equivalent CACHEPOT_* environment variable, making it just as easy to configure whether you are running the binary directly, in a container, or through a process manager.
Full startup example
The command below starts Cache-Pot with every persistence and security option explicitly set. In practice you only need to include the flags you want to change from their defaults.
cache-pot \
--addr :6379 \
--auth mysecretpassword \
--snapshot-path /data/cache-pot.snapshot \
--snapshot-interval 60s \
--aof-path /data/cache-pot.aof \
--aof-fsync everysec \
--dashboard-addr :8080
Configuration reference
Using environment variables
Every flag has a CACHEPOT_ environment variable equivalent. Set the variable before starting the process and the server picks it up automatically.
| Flag | Environment Variable |
|---|
--addr | CACHEPOT_ADDR |
--auth | CACHEPOT_AUTH |
--snapshot-path | CACHEPOT_SNAPSHOT_PATH |
--snapshot-interval | CACHEPOT_SNAPSHOT_INTERVAL |
--aof-path | CACHEPOT_AOF_PATH |
--aof-fsync | CACHEPOT_AOF_FSYNC |
--sweep-interval | CACHEPOT_SWEEP_INTERVAL |
--dashboard-addr | CACHEPOT_DASHBOARD_ADDR |
Environment variables accept the same values as their flag equivalents. Duration variables accept Go duration strings (60s, 5m, 1h) or a bare integer number of seconds.
When both a flag and its environment variable are supplied, the flag takes precedence over the environment variable.
Authentication
When --auth is set, every client must issue the AUTH command before Cache-Pot will accept any other command. You can pass the password directly to redis-cli with the -a flag:
redis-cli -p 6379 -a mysecretpassword ping
Or authenticate interactively after connecting:
redis-cli -p 6379
AUTH mysecretpassword
PING # PONG
Cache-Pot does not enable authentication by default. Always set --auth in production or any network-accessible deployment to prevent unauthorised access.
Persistence: snapshots vs. AOF
Cache-Pot supports two complementary persistence mechanisms that you can use independently or together.
Snapshots write the full dataset to a single file at a regular interval. They are compact and fast to load on restart, but you can lose up to one interval’s worth of writes if the process crashes.
Append-only file (AOF) records every write command as it happens. If both are enabled and the AOF contains data, Cache-Pot uses the AOF as the authoritative dataset on startup and skips loading the snapshot. This gives you much finer crash-recovery granularity at the cost of a larger file on disk.
For most single-machine deployments, enabling both gives you the best of both worlds: fast restarts via the snapshot, plus fine-grained recovery via the AOF.