Add prompt-caching module: Spring AI 2.1 Anthropic cache strategies on the real request (breakpoints per strategy, hit/miss/write in Usage, one changed word, multi-block system caching, minimum length, 5-minute and 1-hour lifetimes, the 20-block lookback), OpenAI automatic caching with prompt_cache_key, and a cost table. The vendors are a local server applying their documented rules; no vendor API called. Spring Boot 4.2.0, Spring AI 2.1.0, Java 25.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b4gvXXQgw1eTk5EoTT
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
# A clock in the system prompt: one joined block, or the static prefix pattern (SYSTEM_ONLY)
|
||||
|
||||
multiBlockSystemCaching=false system blocks sent=1 breakpoints=[system[0]]
|
||||
call 1: cacheWrite=6085 cacheRead=0
|
||||
call 2: cacheWrite=6085 cacheRead=0 (the clock changed between the calls)
|
||||
multiBlockSystemCaching=true system blocks sent=2 breakpoints=[system[0]]
|
||||
call 1: cacheWrite=6078 cacheRead=0
|
||||
call 2: cacheWrite=0 cacheRead=6078 (the clock changed between the calls)
|
||||
Reference in New Issue
Block a user