fix(project): invalidate api key cache on deletion#328
fix(project): invalidate api key cache on deletion#328VarshithReddy2006 wants to merge 1 commit into
Conversation
|
Warning Review limit reached
More reviews will be available in 41 minutes and 10 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 To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Fixes #322
Summary
Invalidate Redis project caches when a project is deleted.
Changes
Added
publishableKeyandsecretKeyto the project lookup used bydeleteProject().Invalidated API-key cache entries after project deletion:
project:apikey:<publishableKey>project:apikey:<secretKey>Invalidated project cache:
project:id:<projectId>Problem
The public API authorization flow checks Redis before MongoDB. When a project was deleted, Redis cache entries remained available until TTL expiry, allowing previously cached API keys to continue authorizing requests.
Result
Project deletion now immediately removes the associated Redis cache entries, ensuring deleted projects cannot continue authenticating through stale cached authorization data.