Skip to content

fix: validate and clamp cache TTL to reasonable bounds#482

Merged
agnivo988 merged 3 commits into
agnivo988:mainfrom
saurabhhhcodes:fix/remove-unused-import-448
Jun 18, 2026
Merged

fix: validate and clamp cache TTL to reasonable bounds#482
agnivo988 merged 3 commits into
agnivo988:mainfrom
saurabhhhcodes:fix/remove-unused-import-448

Conversation

@saurabhhhcodes

Copy link
Copy Markdown

Added clampTTL helper that enforces TTL between 1 minute and 7 days. Applied validation in SetTTL, loadConfig, and DefaultConfig to prevent zero/negative values or unbounded TTL.

Closes #445

@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@saurabhhhcodes, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 3 minutes and 56 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 45e6d712-8d99-43f2-8e5c-98f271813cb2

📥 Commits

Reviewing files that changed from the base of the PR and between 6d6fa89 and cdfd688.

📒 Files selected for processing (9)
  • README.md
  • cmd/analyze.go
  • cmd/compare.go
  • internal/analyzer/certificate.go
  • internal/cache/cache.go
  • internal/github/releases.go
  • internal/output/compare.go
  • internal/scheduler/scheduler.go
  • internal/ui/app.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks 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 help to get the list of available commands and usage tips.

@agnivo988
agnivo988 merged commit 4e299fe into agnivo988:main Jun 18, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cache configuration TTL accepts zero or negative values, causing immediate expiration or infinite validity

2 participants