node-stow icon indicating copy to clipboard operation
node-stow copied to clipboard

Batch get

Open Sljux opened this issue 9 years ago • 3 comments

Hello, great lib you've got there 😃 Is there a way to do a batch get of cached items? My use case is as follows: I cache items by their id, and lists of ids. I read a list of ids from cache, and then all the items in the list. If I get items one by one I get to many roundtrips really fast.

Sljux avatar Sep 21 '16 10:09 Sljux

I'm fairly confident this could be done in Redis with an MGET command and a hydration mapping, but I'm looking for your opinion.

Sljux avatar Sep 21 '16 15:09 Sljux

@Sljux glad you are getting some use out of stow. It's still chugging along nicely for my projects as well. I agree that a batch get by list of ids would absolutely be useful. I'm happy to review a PR but don't have the spare cycles to dive into it myself at the moment.

cpsubrian avatar Oct 06 '16 00:10 cpsubrian

Ideally it would be implemented such that backends that don't have a performant way to implement it could bow-out with an error.

cpsubrian avatar Oct 06 '16 00:10 cpsubrian