Skip to main content
These commands manage your connection to Cache-Pot and query server-level information. They follow standard Redis conventions, so any Redis-compatible client can connect and interact with Cache-Pot without modification.

PING

Tests that the connection is alive. Use it to verify that Cache-Pot is reachable before issuing other commands. Syntax: PING [message]
message
string
Optional string to echo back. When omitted, the server returns PONG.
PING         # PONG
PING hello   # hello
Returns: The simple string PONG, or the provided message as a bulk string.

ECHO

Echoes a message back to the client. Useful for debugging connection pipelines and round-trip latency measurements. Syntax: ECHO message
message
string
required
The string to return.
ECHO "hello world"   # hello world
Returns: The provided message as a bulk string.

AUTH

Authenticates your connection with the server password. You must send AUTH as the first command after connecting when Cache-Pot is started with the --auth flag. Syntax: AUTH password
password
string
required
The password configured via the --auth startup flag.
AUTH mysecretpassword   # OK
Returns: OK on success. Returns WRONGPASS invalid username-password pair if the password is incorrect, or an error if no password is configured on the server.
If Cache-Pot was not started with --auth, sending AUTH returns an error: ERR Client sent AUTH, but no password is set.

SELECT

Selects the active database by index. Cache-Pot is single-database in this release, so only index 0 is accepted. Syntax: SELECT index
index
integer
required
The database index to select. Must be 0.
SELECT 0   # OK
SELECT 1   # ERR DB index is out of range (Cache-Pot V1 supports DB 0 only)
Returns: OK for index 0; an error for any other value.

QUIT

Closes the current client connection gracefully. The server sends a final OK reply before tearing down the connection. Syntax: QUIT
QUIT   # OK (connection closed)
Returns: OK, then closes the TCP connection.

COMMAND

Returns information about the commands registered in Cache-Pot. The COUNT subcommand is the most useful variant and is what most Redis clients issue automatically on first connect. Syntax: COMMAND [COUNT]
COUNT
subcommand
When provided, returns the total number of registered commands as an integer.
COMMAND COUNT   # (integer) <number of commands>
Returns: An integer (command count) when COUNT is specified; an empty array otherwise.
COMMAND is implemented as a compatibility stub. Clients that issue COMMAND DOCS on startup (such as newer versions of redis-cli) receive an empty array and fall back to normal operation.

INFO

Returns a bulk string containing server information and statistics, grouped into sections. Syntax: INFO
INFO
# Example output:
# Server
# cache-pot_version:0.1.0
# go_version:go1.22.0
# uptime_in_seconds:3612
#
# Clients
# connected_clients:4
# total_connections_received:109
#
# Persistence
# aof_enabled:1
#
# Keyspace
# db0:keys=1024
#
# Stats
# total_commands_processed:8801
# semantic_cache_hits:214
# semantic_cache_misses:36
# semantic_cache_hit_ratio:0.8559
Returns: A bulk string with the following sections: Server, Clients, Persistence, Keyspace, and Stats. The Stats section includes semantic cache hit and miss counters and the running hit ratio.

DBSIZE

Returns the number of live (non-expired) keys in the current database. Syntax: DBSIZE
DBSIZE   # (integer) 42
Returns: An integer count of keys.

FLUSHDB

Deletes every key in the current database immediately and synchronously. Syntax: FLUSHDB
FLUSHDB   # OK
Returns: OK.
FLUSHDB is irreversible. All keys — including vector collections and semantic cache entries — are permanently deleted. There is no undo. Take a snapshot with SAVE first if you need a recovery point.

FLUSHALL

Behaves identically to FLUSHDB. Because Cache-Pot is a single-database server, FLUSHALL and FLUSHDB delete the same keyspace. Syntax: FLUSHALL
FLUSHALL   # OK
Returns: OK.
Both FLUSHDB and FLUSHALL are provided so that any Redis client or migration script that calls either command works without modification.