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
Currently the redis driver does not implement getItemRaw/setItemRaw. It uses the default method of serializeRawData + setItem.
Since ioredis can binary data, it should be unnecessary to encode it as base64. Directly setting a Buffer would have less overhead and be more space-efficient. However, there would be compatibility issues with existing data. Perhaps it could be implemented as an option or separate driver?
This could perhaps be done with #528 and I think that would avoid the breaking aspects. For example setItemRaw could continue to base64 encode and save as a string, but setItem(k, v, { type: 'bytes'}), could save as binary.
Additional information
Would you be willing to help implement this feature?
The text was updated successfully, but these errors were encountered:
Describe the feature
Currently the redis driver does not implement
getItemRaw
/setItemRaw
. It uses the default method ofserializeRawData
+setItem
.Since ioredis can binary data, it should be unnecessary to encode it as base64. Directly setting a
Buffer
would have less overhead and be more space-efficient. However, there would be compatibility issues with existing data. Perhaps it could be implemented as an option or separate driver?https://github.com/redis/ioredis#handle-binary-data
Here's an example implementation. It would still need to be updated to handle non-Buffer values.
This could perhaps be done with #528 and I think that would avoid the breaking aspects. For example
setItemRaw
could continue to base64 encode and save as a string, butsetItem(k, v, { type: 'bytes'})
, could save as binary.Additional information
The text was updated successfully, but these errors were encountered: