Cache TTL may not match your request cadence
PrefixAudit rule ttl-cadence · v0.1.0
Why it breaks your cache
Anthropic caches expire after 5 minutes by default (1 hour at 2x write cost). A prefix reused every 20 minutes never earns a read and pays the write premium every single time. Over-pinging to keep it warm is also expensive: 30s pings cost ~$3.60/hr vs ~$0.45/hr at the ~4min optimum for a 100K-token prefix.
How to fix it
Measure your real inter-request gap. Under 5 minutes: default TTL is fine. Between 5 and 60 minutes on steady traffic: the 1h tier usually wins. Longer: stop caching and stop paying the write surcharge.
How common is it?
This rule needs request or runtime context that an extracted prompt cannot supply, so it is excluded from the corpus study. It still runs in the auditor when you supply that context.
Estimated impact
Modelled as invalidating 0% of the cached prefix.
Is your prompt affected?
Paste it and find out. Static analysis, in-browser, nothing leaves the page.
Run the audit →