fix(cache): improve TTLCache key validation#4900
Conversation
|
@poonam072 is attempting to deploy a commit to the jhasourav07's projects Team on Vercel. A member of the Team first needs to authorize it. |
Aamod-Dev
left a comment
There was a problem hiding this comment.
Excellent fix! Improving the TTLCache key validation prevents subtle caching bugs and null-key collisions. Approving!
Aamod-Dev
left a comment
There was a problem hiding this comment.
Thanks for putting this together. The code looks clean and solves the issue effectively.
I'm happy to approve this. Great job!
Aamod-Dev
left a comment
There was a problem hiding this comment.
Thanks for the contribution. I went through the changes and the overall approach looks good, but there are a few issues that should be addressed before this can be merged. Most of the concerns are related to correctness and maintainability.
- There are merge conflicts with the base branch. Please resolve them to ensure existing functionality isn't broken.
Once these issues are addressed, I'll be happy to take another look. Thanks again for the contribution.
Aamod-Dev
left a comment
There was a problem hiding this comment.
Thanks for the updates! It looks like the CI pipeline (\Format · Lint · Typecheck · Test\ and \Production Build) is currently failing. Please run the build and tests locally to fix the issues so we can merge this. Thanks!
Aamod-Dev
left a comment
There was a problem hiding this comment.
Thanks for the contribution. The overall approach looks good, but the CI pipeline is currently failing. Please run the checks (like npm run format, npm run lint, and npm run test) locally to identify and fix the issues. Let me know once it's green!
Aamod-Dev
left a comment
There was a problem hiding this comment.
This PR is currently marked with the \status:blocked\ label. Please resolve the blockers so we can proceed with a full review and approval.
Aamod-Dev
left a comment
There was a problem hiding this comment.
This PR is currently marked with the \status:blocked\ label. Please resolve the blockers so we can proceed with a full review and approval.
Aamod-Dev
left a comment
There was a problem hiding this comment.
Thanks for the contribution! I went through the changes and have evaluated them according to the rubric.
📦 Next.js Bundle Size Report (Gzipped Sizes)✨ No significant bundle size changes detected. 📊 Summary of Totals
|
|
Hi! The Vercel preview deployment is showing "Authorization required to deploy" since I'm an external contributor. Also, the branch shows gssoc:needs-rebase. Could a maintainer please guide or rebase/approve when possible? Thanks! |
Aamod-Dev
left a comment
There was a problem hiding this comment.
Crucial fix! I went through the changes and strictly validating TTL cache keys prevents accidental cache collisions and corrupted states.
Labels applied:
- level:advanced: Enhancing cache integrity.
- quality:clean: Safe validations.
- ype:bug: Fixes cache pollution.
|
🎉 Congratulations @poonam072! Your PR has been successfully merged. 🚀 Thank you for contributing to CommitPulse. Your work helps us build a better tool for the community.
Keep building! 💻✨ |
Description
Fixes #1875
Fix TTLCache key validation edge cases and align error handling with test expectations.
This ensures empty and whitespace-only keys are properly rejected and all unit tests pass consistently.
Pillar
Changes Made
assertValidKeylogic for cache keysset,has, etc.) use unified validationTesting
Checklist before requesting review: