Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Greptile SummaryThis PR introduces a foundational Key Features:
Test Coverage:
The implementation properly addresses previous review feedback regarding bytes/string handling and index TTL management. No active API or async worker code uses this manager yet - it's purely foundational infrastructure for follow-on PRs. Confidence Score: 5/5
Important Files Changed
Last reviewed commit: b1a43cc |
JadeCara
left a comment
There was a problem hiding this comment.
Looks solid! I left a few smaller comments etc but approving so you can merge when ready :)
The only main question I have is - I see all the mechanics we need to handle the indexes well. If keys get expired via TTL the index set doesn't get automatically evicted. In implementation we should be more explicit about it, but it might be worth adding a prune function to clean up any any index members whose data keys no longer exist.
Deserialize keys to strings when in `get_keys_by_index` - preferring deliberate conversion over `decode_responses` Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Ticket ENG-2757
Description Of Changes
TL;DR - redis cache manager with automatic set-based key indexing, lazy migration of old keys, is not used in any APIs or async functions in this PR, it is purely the storage logic.
This PR lays the groundwork for a Redis cache layer that avoids using KEYS (and eventually SCAN) by providing a convenience layer for secondary index storage (and also as a starting point for other Redis improvements like clustering, enhanced logging, monitoring, etc). This implementation provides the following (and nothing else) - a RedisCacheManager that provides a layer around the Redis client to automatically handle secondary indexing of keys so that they can be cleared and queried without synchronous (and slow) access like KEYS (or SCAN). It does this by allowing you to specify an index name and then transparently recording keys that are related to that index in a Redis set with that name (i.e dsr:1234 or something). Then you can quickly get all the keys for iteration or determine membership, etc.
The RedisCacheManager is not used in any active API/async worker code in this PR, it is purely a base for the follow ons - DSR storage layer, identity cache, encryption and custom fields, request body, etc. in subsequent PRs.
Code Changes
Steps to Confirm
Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works