ioredis
ioredis copied to clipboard
support for RedisJSON
Hi, community
I am developing a nodeJS application that requires me to use Redis cache for storing the data as objects. The problem is I want to store objects(3-4 level depth) with respecting their nested types.
right now I'm using some external plugins along with node-redis which uses flatten and unflatten to store value as Hash key-value pair which is again not good for performance but it's a working solution.
does the current version of ioredis support redisJSON? if not, is there any work going on in this direction?
ioredis is able to execute arbitrary Redis commands via .call. You can do redis.call('JSON.GET', ...yourargs). Does this solve your issue?
Is it possible to add docs for this feature?
@wenq1 Added an example: https://github.com/luin/ioredis/blob/main/examples/module.js.
Thanks so much. already resolved.