Unverified70% confidenceFactExact time
Prefix matching requires that only a contiguous sequence starting from the first token that is completely identical can hit the cache.
2
Sources
70%
Confidence
Long-term
Relevance
8/13/2026
First Seen
Sources
Related Claims
UnverifiedCache matching typically requires an exact prefix match (including the token sequence), which is why developers need to place stable content at the front of the prompt and keep the order unchanged.79% similarUnverifiedre.match() only attempts to match a pattern starting from the beginning of the string but does not require the match to reach the end of the string, effectively performing prefix matching.72% similarUnverifiedre.fullmatch() requires the pattern to fully match the entire string, from beginning to end.71% similarUnverifiedPrompt caching matches an identical token sequence backward from the beginning of the prompt, and the matched portion receives the discount; once the tokens diverge, subsequent content is billed at full price.66% similarUnverifiedFor example, when matching a123b456b with a.*b, .* first swallows up to the last b, and if the overall match succeeds, it does not backtrack.65% similar
Cite This Claim
Stable URI
https://kongchang.com/claim/741800API
curl https://kongchang.com/api/v1/knowledge/claims/741800MCP
get_claim(id=741800)