--snapshot-path) and an append-only file (enabled with --aof-path). Both can be active simultaneously.
SAVE
Writes a full snapshot of the current keyspace to disk synchronously. The server serializes every key, hash, list, set, sorted set, and vector collection to the configured snapshot file before returningOK.
Syntax: SAVE
OK when the snapshot has been written successfully. Returns an error if no snapshot path is configured.
SAVE writes to the path set by --snapshot-path (default filename: cache-pot.snapshot). The server does not fork — it holds an in-process read lock across each keyspace shard while writing. Latency-sensitive workloads should schedule SAVE during low-traffic windows.BGSAVE
Triggers a snapshot write using the same synchronous path asSAVE. The BG prefix is retained for Redis client compatibility — Cache-Pot does not fork a background process.
Syntax: BGSAVE
OK on success; the same error as SAVE if no snapshot path is configured.
Unlike Redis, Cache-Pot does not fork a child process for
BGSAVE. The write is synchronous. The command name is kept so that backup scripts and monitoring tools designed for Redis work without changes.BGREWRITEAOF
Compacts the append-only file by rewriting it to contain only the minimum set of commands needed to reconstruct the current keyspace state. This eliminates superseded writes and reduces the AOF file size. Syntax:BGREWRITEAOF
OK when the rewrite completes. Returns an error if AOF is not enabled.
BGREWRITEAOF only has an effect when Cache-Pot is started with --aof-path. Without it, the command returns ERR AOF is disabled (no --aof-path configured).