node-cache-manager-fs-binary icon indicating copy to clipboard operation
node-cache-manager-fs-binary copied to clipboard

Use case not clear

Open simlu opened this issue 8 years ago • 2 comments

Why would I choose this over https://github.com/hotelde/node-cache-manager-fs?

Is it faster? What additional features does it have?

I can't be the only one having that question. Might be a good idea to dedicate a section in the Readme to this.

simlu avatar Oct 22 '17 17:10 simlu

Yes, indeed.

The use case is here: http://sheershoff.ru/nodejs-cache-binary-data-on-local-disk-filesystem/

I've been caching userpics collages ~ 100kb size. And it took ~0.6 sec on a single CPU/SSD to send collage over res.send(). When I improved and embedded the binary version, it became at least 10 times faster and took 0.06 sec average. File storage took ~3 times more. And the binary stream were stored in JSON in the following format:

{
  "somekey": {
    "type": "Buffer",
    "data": [
      10,
      13,
       ...
     ]
  }
}

sheershoff avatar Jun 06 '18 19:06 sheershoff

@sheershoff but the package has outdated dependencies and not been maintained for a long time!

sayjeyhi avatar Apr 19 '24 07:04 sayjeyhi