Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Memcached on NodeJS - node-memcached or node-memcache, which one is more stable?

I need to implement a memory cache with Node, it looks like there are currently two packages available for doing this:

  • node-memcached (https://github.com/3rd-Eden/node-memcached)
  • node-memcache (https://github.com/vanillahsu/node-memcache)

Looking at both Github pages it looks like both projects are under active development with similar features.

Can anyone recommend one over the other? Does anyone know which one is more stable?

like image 945
dmck Avatar asked Oct 02 '11 00:10

dmck


1 Answers

At the moment of writing this, the project 3rd-Eden/node-memcached doesn't seem to be stable, according to github issue list. (e.g. see issue #46) Moreover I found it's code quite hard to read (and thus hard to update), so I wouldn't suggest using it in your projects.

The second project, elbart/node-memcache, seems to work fine , and I feel good about the way it's source code is written. So If I were to choose between only this two options, I would prefer using the elbart/node-memcache.

But as of now, both projects suffer from the problem of storing BLOBs. There's an opened issue for the 3rd-Eden/node-memcached project, and the elbart/node-memcache simply doesn't support the option. (it would be fair to add that there's a fork of the project that is said to add option of storing BLOBs, but I haven't tried it)

So if you need to store BLOBs (e.g. images) in memcached, I suggest using overclocked/mc module. I'm using it now in my project and have no problems with it. It has nice documentation, it's highly-customizable, but still easy-to-use. And at the moment it seems to be the only module that works fine with BLOBs storing and retrieving.

like image 147
Andrey Lushnikov Avatar answered Sep 26 '22 08:09

Andrey Lushnikov