gitwtfhub

wtf is cache-hunter?

co-l/cache-hunter — explained in plain English

Analysis updated 2026-05-18

39TypeScriptAudience · developerComplexity · 3/5Setup · moderate

TL;DR

Cache Hunter is a transparent proxy that logs AI API traffic to SQLite, helping developers infer whether requests are hitting a model's prefix cache.

Mindmap

mindmap
  root((Cache Hunter))
    What it does
      Transparent proxy
      SQLite request logging
      Cache hit inference
      Prefix overlap detection
    Tech stack
      TypeScript
      Node.js
      SQLite
    Use cases
      Debug prefix caching
      Analyze latency per token
      Trace conversation chains
    Audience
      AI tool developers
      Backend engineers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Log all traffic between your AI coding tool and a local model server to inspect it later.

REASON 2

Estimate whether prefix caching is working by comparing latency per token across similar requests.

REASON 3

Find requests that share a common prefix to understand conversation reuse patterns.

REASON 4

Check that a growing conversation's context stays consistent over time.

What's in the stack?

TypeScriptNode.jsSQLitenpm

How it stacks up

co-l/cache-hunterchaos-xxl/zelda-hyrule-uicoasty-ai/open-cowork
Stars393939
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderateeasyeasy
Complexity3/52/53/5
Audiencedeveloperdevelopervibe coder

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires a running OpenAI-API compatible model server such as vLLM to point the proxy at.

The explanation does not state a license, so terms of use are unclear.

Wtf does this do

Cache Hunter is a small proxy tool for developers who are building on top of AI models and want to understand how well those models are reusing cached context. Many local AI serving systems, such as vLLM, support a feature called prefix caching, where a model can reuse work it already did for a piece of text it saw before, making later requests faster. The problem is that these systems usually do not tell you directly whether a given request was a cache hit or a cache miss, so Cache Hunter tries to work that out indirectly. It works by sitting between your AI tool, called a harness in the README, and the actual model server. You point your tool at Cache Hunter instead of the real server, and Cache Hunter quietly forwards every request through to the real one and copies down everything that happens along the way, including the full request and response bodies, timing information, and token counts, into a local SQLite database file. Once some traffic has been captured, Cache Hunter includes ready made scripts and example database queries to help make sense of it. These look at how much time each response took per token, since a request that shares a prefix with an earlier one but still takes a long time per token is a sign the cache was likely missed. Other scripts look for requests that share a common beginning, or track how a conversation's context grows over time and check that it stays internally consistent. The tool describes itself as completely transparent, meaning it passes every request through unchanged rather than modifying anything, and it supports the streaming response format used by chat style AI APIs. Logging happens in the background so it does not slow down the requests it is watching, and each request gets a tracking id in its response headers so a specific exchange can be found again later in the database. Cache Hunter is written in TypeScript, installed with npm, and started with a single command. It is meant as a debugging and analysis tool for developers, not an end user product, and its own documentation notes that its findings are only clues about caching behavior rather than a direct confirmation, since the underlying model servers do not expose that information themselves.

Yoink these prompts

Prompt 1
Show me how to run Cache Hunter as a proxy in front of my local vLLM server.
Prompt 2
Explain how Cache Hunter infers cache hits and misses from response latency.
Prompt 3
Write a SQL query against cache-hunter.db to find the slowest requests per token.
Prompt 4
How do I use the correlation id header Cache Hunter adds to trace a specific request?

Frequently asked questions

wtf is cache-hunter?

Cache Hunter is a transparent proxy that logs AI API traffic to SQLite, helping developers infer whether requests are hitting a model's prefix cache.

What language is cache-hunter written in?

Mainly TypeScript. The stack also includes TypeScript, Node.js, SQLite.

What license does cache-hunter use?

The explanation does not state a license, so terms of use are unclear.

How hard is cache-hunter to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is cache-hunter for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.