Skip to main content
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.

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. 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:
Or authenticate interactively after connecting:
Cache-Pot does not enable authentication by default. Always set --auth in production or any network-accessible deployment to prevent unauthorised access.

TLS

Set --tls-cert and --tls-key together to serve the RESP2 port over TLS (minimum TLS 1.2). Both flags must be present, or the server refuses to start:
Existing Redis clients connect the same way, with TLS enabled — for example redis-cli --tls --cacert cert.pem, or cache-pot cli --tls --tls-cacert cert.pem.
TLS is off by default and independent of --auth — you can combine both, or use either alone.

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.