Repository navigation
feat(cache): add resolveCacheKey and .resolveKey() - #6
Conversation
…lidation
Add a `resolveCacheKey({ options, args })` utility and a `.resolveKey()` method
on cached functions to resolve the exact storage key, making cache invalidation
straightforward without guessing internal key formats.
Closes #4
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe changes introduce a Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Summary
resolveCacheKey({ options, args })standalone utility to resolve the exact storage key using the same derivation logic asdefineCachedFunction.resolveKey(...args)method on cached functions returned bydefineCachedFunctionfor convenient key resolutionCachedFunctiontype exportCloses #4
Test plan
resolveCacheKeywith customgetKey, default hash, custombase/group/name.resolveKey()matches internal key used bydefineCachedFunction🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
.resolveKey()method to programmatically compute cache keys.resolveCacheKey()utility function enables flexible cache key resolution with custom options.CachedFunctiontype for improved TypeScript support.Documentation