Skip to content

feat: add tiered cache invalidation#378

Merged
alecthomas merged 1 commit into
mainfrom
aat/tiered-cache-invalidation
Jul 3, 2026
Merged

feat: add tiered cache invalidation#378
alecthomas merged 1 commit into
mainfrom
aat/tiered-cache-invalidation

Conversation

@alecthomas

Copy link
Copy Markdown
Collaborator

No description provided.

@alecthomas alecthomas requested a review from a team as a code owner July 3, 2026 06:31
@alecthomas alecthomas requested review from stuartwdouglas and removed request for a team July 3, 2026 06:31
@alecthomas alecthomas enabled auto-merge (squash) July 3, 2026 06:31
@alecthomas alecthomas merged commit 6def9fd into main Jul 3, 2026
7 checks passed
@alecthomas alecthomas deleted the aat/tiered-cache-invalidation branch July 3, 2026 06:33

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e579e80dee

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread internal/cache/tiered.go
if len(caches) == 1 {
return caches[0]
}
return Tiered{caches}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve unsupported stats for single-tier caches

When exactly one backend is configured, wrapping it in Tiered changes unsupported operations into successful empty results: Tiered.Stats skips ErrStatsUnavailable and then returns a zero Stats, and ListNamespaces similarly returns an empty slice. For a lone S3 or noop cache this makes /api/v1/stats report 200 with fabricated zero capacity/object counts instead of the backend's unsupported error, which can mislead monitoring and clients; the previous single-cache passthrough avoided this.

Useful? React with 👍 / 👎.

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