Skip to content

Use 1h prompt-cache TTL to lift hit rate on sparse usage - #5

Merged
ssethia2 merged 1 commit into
mainfrom
ss/cache-ttl
Jun 15, 2026
Merged

Use 1h prompt-cache TTL to lift hit rate on sparse usage#5
ssethia2 merged 1 commit into
mainfrom
ss/cache-ttl

Conversation

@ssethia2

Copy link
Copy Markdown
Owner

The cached system/tools prefix used the default 5-min ephemeral TTL, which expires between Aria's bursty, intermittent interactions — so each turn re-paid a cache write instead of getting cheap reads (low hit rate, wasted spend). Switch the stable block to a 1h TTL (env-overridable via ARIA_CACHE_TTL); reads stay ~0.1x and the cache spans the gaps between clustered turns. SDK (anthropic 0.84) supports ttl in cache_control.

Assisted-by: Claude Code (Opus 4.8)

The cached system/tools prefix used the default 5-min ephemeral TTL, which expires
between Aria's bursty, intermittent interactions — so each turn re-paid a cache write
instead of getting cheap reads (low hit rate, wasted spend). Switch the stable block to
a 1h TTL (env-overridable via ARIA_CACHE_TTL); reads stay ~0.1x and the cache spans the
gaps between clustered turns. SDK (anthropic 0.84) supports ttl in cache_control.

Assisted-by: Claude Code (Opus 4.8)
@ssethia2
ssethia2 merged commit 8993e7e into main Jun 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant