fix(backend): don't mislabel fresh lockdown-gate cache hits as stale #23
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: shekhar/windows-iso-downloader#23
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/lockdown-cache-status"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Test plan
Summary by CodeRabbit
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID:
3d5ceedf-7bd3-44aa-9d35-d0b58ff7b223📥 Commits
Reviewing files that changed from the base of the PR and between
e5d9dc3d61and8b430fab5d.📒 Files selected for processing (1)
backend/main.go📝 Walkthrough
Walkthrough
The Sentinel lockdown handling in backend/main.go's handleProxy function now checks whether a cached staleEntry is still within its TTL. If within TTL, it's served as cached with corresponding metrics and headers; otherwise it's served as stale, replacing the prior unconditional stale treatment.
Changes
Sentinel lockdown cache status fix
backend/main.gostaleEntry.ExpiresAtin the lockdown branch to serve entries as cached (mLinkCacheHits,X-MSDL-Link-Status: cached) when still within TTL, or as stale (mLinkStale,X-MSDL-Link-Status: stale) otherwise.Estimated code review effort: 1 (Trivial) | ~5 minutes
✨ Finishing Touches
📝 Generate docstrings
🧪 Generate unit tests (beta)
fix/lockdown-cache-statusThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.