Skip to content

Claude/sleepy johnson al1ndh - #6

Merged
Chandra179 merged 5 commits into
mainfrom
claude/sleepy-johnson-al1ndh
Oct 28, 2026
Merged

Chandra179 merged 5 commits into
mainfrom
claude/sleepy-johnson-al1ndh

Conversation

@Chandra179

Copy link
Copy Markdown
Owner

No description provided.

- Give in-load cache read/write their own 1s timeout so a slow cache
  cannot consume LoadTimeout.
- Scope singleflight key by Cache instance so identical keys on
  different caches load separately.
- Treat negative TTL as no expiry; reject SetNX ttl <= 0 with ErrInvalidTTL.
- Document Load must not panic, nil-sentinel collision, stale-write race.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPH4seaqkaPedocjzkHZ4L
- Diagram: per-cache flight key, separate 1s cache timeouts, panic row,
  drop blog front matter and stale 'was removed' wording.
- README: drop the copied interface block and layout table, link to the
  diagram doc instead of repeating it, use log.Fatal in the example.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPH4seaqkaPedocjzkHZ4L
The previous commit removed it on the assumption nothing used it. Restore
it, including links.github, and bump updated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPH4seaqkaPedocjzkHZ4L
…ght key

- Apply cacheOpTimeout to the first lookup too.
- Set ContextTimeoutEnabled so go-redis honours ctx deadlines; without it
  the 1s cache limits did nothing against a hung Redis (9s measured, 3s now).
- flightKey: only scope by pointer Caches; fall back to the key otherwise.
- jitter returns 0 for non-positive ttl instead of the caller clamping.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPH4seaqkaPedocjzkHZ4L
The unit tests (miniredis) cover the same behaviour without Docker.
Drop cache/example, the testcontainers dependency, the cache entry in the
CI integration matrix and the Docker wording in the Makefile and docs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPH4seaqkaPedocjzkHZ4L
@Chandra179
Chandra179 merged commit a310598 into main Oct 28, 2026
1 of 14 checks 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.

2 participants