String
MGET
Load multiple keys from Redis in one go.
type MyType = {
a: number;
b: string;
}
const values = await redis.mget<MyType>("key1", "key2", "key3");
// values.length -> 3
For billing purposes, this counts as a single command.
Arguments
keys
...string
requiredMultiple keys to load from Redis.
Response
An array of values corresponding to the keys passed in. If a key doesn’t exist, the value will be null
.
Was this page helpful?
type MyType = {
a: number;
b: string;
}
const values = await redis.mget<MyType>("key1", "key2", "key3");
// values.length -> 3