You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here I would expect await redis.get(KEY) to always return a string, but I am seeing it return at random either a string or a buffer.
When I say at random, I mean that I didn't identify what causes it sometimes to return one or the other, but it seems like once it starts to return a buffer for a key it always does.
I worked around this issue with:
if(Buffer.isBuffer(cached)){try{cached=Buffer.from(cached).toString('utf8');}catch(error){console.error('could not convert buffer to string',{
error,extra: {KEY,},});}}
but regardless this feels like a bug.
Node.js Version
v24.0.1
Redis Server Version
8
Node Redis Version
5.1.0
Platform
Linux
Logs
n/a
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Description
Here I would expect
await redis.get(KEY)
to always return a string, but I am seeing it return at random either a string or a buffer.When I say at random, I mean that I didn't identify what causes it sometimes to return one or the other, but it seems like once it starts to return a buffer for a key it always does.
I worked around this issue with:
but regardless this feels like a bug.
Node.js Version
v24.0.1
Redis Server Version
8
Node Redis Version
5.1.0
Platform
Linux
Logs
The text was updated successfully, but these errors were encountered: