good first issue
Repository metrics
- Stars
- (21 stars)
- PR merge metrics
- (PR metrics pending)
Description
Background
The redis adaptor supports basic Redis commands, it lacks support for the mGet() and mSet() commands, which are essential for efficiently handling multiple key-value pairs in Redis.
Feature Request
I propose adding two new helper methods to the Redis adaptor: mGet() and mSet(). These methods should mirror the functionality of Redis's native json.mGet and json.mSet commands, allowing us to retrieve and set multiple key-value pairs in a single operation.
Implementation Details
-
mGet(keys: Array<string>):- Accepts an array of strings, where each string is a key in Redis.
- Returns an array of values corresponding to the provided keys.
-
mSet(keyValuePairs: Object):- Accepts an object where each key-value pair corresponds to a Redis key and its associated value.
- Sets all the key-value pairs in Redis in a single operation.
Use Cases
mGet(): This will be particularly useful when retrieving multiple related values from Redis in a single call, reducing the need for multiplejGetoperations and improving performance.mSet(): This will allow us to efficiently store multiple key-value pairs at once, which is beneficial when working with bulk data.
Redis Docs