Pattern 1: Semantic response caching
Save LLM responses keyed by meaning, not by exact text. When a user asks something semantically equivalent to a question you have already answered — even if the wording is completely different — Cache-Pot returns the stored response instead of making another model call.SCACHE.GET and SCACHE.SET require an embeddings provider. Set CACHEPOT_EMBED_URL and CACHEPOT_EMBED_KEY on the Cache-Pot server before using these commands. A free local Ollama instance or an OpenAI API key both work.THRESHOLD:
http://localhost:8080 — every hit is a model call you did not pay for.
Pattern 2: Vector similarity search
Store document embeddings and retrieve the most relevant ones for retrieval-augmented generation (RAG). Your application produces the embeddings; Cache-Pot stores and searches them with cosine similarity.All vectors in a collection must share the same dimension, fixed by the first
VSET call. VDIM documents returns the dimension of an existing collection. VCARD documents returns the number of stored vectors.Pattern 3: Agent session memory
Store per-user or per-session state that persists across agent turns.REMEMBER writes a named field into a session namespace; RECALL reads one field or the entire session back.
REMEMBER and RECALL are backed by a per-session hash named mem:<session>. You can inspect or edit session memory directly with HGETALL mem:<session> using any Redis client or the Cache-Pot dashboard.