cache-stats is an opencode TUI plugin. It shows the cache rate of a session. It opens a dialog when you run the slash command /cache-stats. It does not invoke an AI model.
You use it to see how much of the prompt input comes from the cache. A high rate means a lower cost for the session.
The plugin uses this formula:
hit = cache read / (input + cache read)
The rate uses the token counts of the session. The counts come from the messages of the session and its subagents. Cache write is a one-time priming cost, so it is not part of the rate.
The plugin shows a verdict word and a color for the rate. The word is Excellent at 90% or more. The word is Good at 70% to 89%. The word is Fair at 40% to 69%. The word is Poor below 40%. The mapping is in docs/colors.md.
docs/installation.md— how to install the plugindocs/usage.md— how to use the slash command and read the dialogdocs/how-it-works.md— how the plugin collects and computes the datadocs/colors.md— how the plugin shows the rate with colorsdocs/troubleshooting.md— how to fix common errors
Read docs/installation.md first.