Return the value of the specified key or null if the key doesn’t exist.
type MyType = { a: number; b: string;}const value = await redis.get<MyType>("key");if (!value) { // key doesn't exist} else { // value is of type MyType}
The response is the value stored at the key or null if the key doesn’t exist.
type MyType = { a: number; b: string;}const value = await redis.get<MyType>("key");if (!value) { // key doesn't exist} else { // value is of type MyType}
type MyType = { a: number; b: string;}const value = await redis.get<MyType>("key");if (!value) { // key doesn't exist} else { // value is of type MyType}
Assistant
Responses are generated using AI and may contain mistakes.