Skip to content
All topics

Domain

Caching

Exact, semantic and provider-side caching for AI applications, with the invalidation and security problems each brings.

0 of 19 articles published. Topics are listed in reading order: each comes after the topics it builds on.

Caching fundamentals

The ideas every cache shares, before anything AI-specific.

  1. Caching fundamentalsComing soon

    What a cache trades away for speed and cost, and how to tell whether a workload will benefit.

    Fundamentals · Beginner

  2. Cache key designComing soon

    Choosing what goes into a key so that equal requests share entries and different ones never do.

    Fundamentals · Intermediate

  3. TTL strategiesComing soon

    Fixed, sliding and jittered expiry, and how to pick a TTL from how quickly data goes stale.

    Configuration · Intermediate

  4. Cache invalidationComing soon

    Event-driven, versioned and time-based invalidation, and the consistency each one gives.

    Architecture · Advanced

  5. Redis as a cache: architectureComing soon

    How Redis stores data, evicts it and replicates it, and what that means for a cache tier.

    Architecture · Advanced

Exact-match response caching

Reusing a model's answer when the same request arrives again.

  1. Exact-match LLM response cachingComing soon

    Keying on the normalised request, deciding which parameters belong in the key, and when caching an answer is wrong.

    Implementation · Intermediate

  2. Provider-side prompt cachingComing soon

    How providers reuse the processed prefix of a prompt, how to structure prompts to benefit, and how it differs from response caching.

    Fundamentals · Advanced

Semantic caching

Reusing answers for requests that mean the same thing but are worded differently.

  1. Semantic caching fundamentalsComing soon

    Looking up past answers by meaning rather than exact text, and the new failure modes that brings.

    Fundamentals · Beginner

  2. How semantic similarity worksComing soon

    Cosine similarity and distance metrics, what a similarity score does and does not tell you.

    Fundamentals · Intermediate

  3. Embeddings for semantic cache lookupComing soon

    Choosing and versioning the embedding model used for cache keys, and what changing it does to the cache.

    Implementation · Intermediate

  4. Selecting similarity thresholdsComing soon

    Measuring false hits against hit rate on your own traffic instead of copying a number from elsewhere.

    Performance · Advanced

  5. Semantic cache architectureComing soon

    Where the cache sits in the request path, what it stores, and how lookups and writes flow.

    Architecture · Advanced

  6. Redis-based semantic cachingComing soon

    Building a semantic cache on Redis vector search, step by step, with tests.

    Implementation · Advanced

  7. Multi-tenant semantic cachingComing soon

    Keeping one tenant's cached answers from ever reaching another, by design rather than by filter.

    Security · Production

  8. Semantic cache invalidationComing soon

    Expiring answers when source data, prompts or models change, when entries are not keyed by exact text.

    Architecture · Production

  9. Semantic cache poisoningComing soon

    How an attacker can plant answers that are served to other users, and the controls that stop it.

    Security · Production

  10. Evaluating a semantic cacheComing soon

    Building a labelled set of paraphrases and near-misses to measure correctness, not just hit rate.

    Performance · Production

  11. Semantic cache observabilityComing soon

    The metrics, logs and traces that show whether the cache is saving money without serving wrong answers.

    Operations · Production

  12. Production semantic cache deploymentComing soon

    Rolling out a semantic cache safely: shadow mode, gradual enablement, kill switch and capacity.

    Operations · Production