redis-dataloader icon indicating copy to clipboard operation
redis-dataloader copied to clipboard

Use a global dataloader for the batch load function

Open scf4 opened this issue 8 years ago • 3 comments

In my personal fork of redis-dataloader I use a final dataloader instance to coalesce redis mget calls. It's super helpful, saving ~3-4 round trips per request.

https://github.com/scf4/ioredis-dataloader/blob/master/index.js

Side note, if you'd be interested I'd like to merge my code into yours by adding node-redis support and passing tests, and then I could help with maintenance of the project.

scf4 avatar Aug 07 '17 20:08 scf4

Hey ok that sounds great thanks!

One thing is I need this library to be compatible with at least node 6. I don't think the await/async stuff is supported until node 7?

Maybe I could put in some babel transpilation, I was thinking about adding support for flow types anyways.

DubFriend avatar Aug 11 '17 21:08 DubFriend

any async/await support in the works or suggestions on a library that is similar? @DubFriend @scf4

artgibson avatar Oct 23 '17 18:10 artgibson

@scf4 i think enough time has past where we can make these changes

PatrickJS avatar Aug 16 '20 19:08 PatrickJS