feat: add file-based quota cache with stale fallback #1

Merged
guochao merged 1 commit from guochao/claude-statusline:master into master 2026-05-11 03:08:40 +00:00
Owner

Cache provider balance data to ${XDG_RUNTIME_DIR:-~/.cache}/claude-status/${provider}.json
with a 60s TTL (mtime-based). On cache hit, skip the API call entirely. When the
API call fails but stale cache exists, serve it with a * prefix on the summary.
Add --no-cache flag to bypass cache reads and writes.

Cache provider balance data to ${XDG_RUNTIME_DIR:-~/.cache}/claude-status/${provider}.json with a 60s TTL (mtime-based). On cache hit, skip the API call entirely. When the API call fails but stale cache exists, serve it with a `*` prefix on the summary. Add `--no-cache` flag to bypass cache reads and writes.
Cache provider balance data to ${XDG_RUNTIME_DIR:-~/.cache}/claude-status/${provider}.json
with a 60s TTL (mtime-based). On cache hit, skip the API call entirely. When the
API call fails but stale cache exists, serve it with a `*` prefix on the summary.
Add `--no-cache` flag to bypass cache reads and writes.
guochao merged commit 6143b51825 into master 2026-05-11 03:08:40 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: public/claude-statusline#1
No description provided.