EXPIRE and PEXPIRE, and you can always check what type a key holds with the TYPE command.
Strings
Binary-safe values up to 512 MB. Strings are the most fundamental type and double as integers when the stored value is a valid integer — commands likeINCR and INCRBY operate atomically on the numeric representation.
Key commands: SET, GET, INCR, DECR, INCRBY, DECRBY, APPEND, STRLEN, GETRANGE, SETRANGE, GETSET, MGET, MSET
Hashes
Field-value maps stored under a single key — ideal for representing objects like users, sessions, or configuration records. Each field is itself a string value. Key commands:HSET, HGET, HGETALL, HDEL, HLEN, HKEYS, HVALS, HEXISTS, HMGET
Lists
Ordered sequences of strings where you can push and pop from either end. Use lists for queues, stacks, timelines, and any workload that needs ordered insertion. Key commands:LPUSH, RPUSH, LPOP, RPOP, LRANGE, LLEN, LINDEX
Sets
Unordered collections of unique string members. Sets enforce uniqueness automatically — adding an already-present member is a no-op. Use sets for tags, unique visitors, or membership checks. Key commands:SADD, SMEMBERS, SISMEMBER, SREM, SCARD
Sorted Sets
Members paired with a floating-point score. Cache-Pot keeps members ordered by score at all times, making sorted sets perfect for leaderboards, priority queues, and time-series data (using timestamps as scores). Key commands:ZADD, ZRANGE, ZRANGEBYSCORE, ZSCORE, ZREM, ZCARD
Vector Collections
Float32 vector arrays with cosine similarity search — Cache-Pot’s native AI-oriented type. A collection is a named group of vectors that all share the same dimension. The dimension is fixed the moment you insert the first vector; subsequent inserts must match it exactly. Each vector entry has three parts: a string ID, the float32 array, and an optional META string for storing arbitrary text (such as the source document or a serialised JSON payload). Key commands:VSET, VSEARCH, VDEL, VCARD, VDIM
All vectors in a collection must have the same dimension. If you attempt a
VSET with a different number of floats than the first insertion, Cache-Pot returns an error. Plan your embedding dimensions before populating a collection.Inspecting key types
UseTYPE to check any key’s type at any time:
Key expiry
Every data type supports automatic expiry. Set a time-to-live withEXPIRE (seconds) or PEXPIRE (milliseconds), and Cache-Pot deletes the key once the TTL elapses: