1

I am considering using a javascript object as a site-wide key/value memory cache. Is there any limitations in amount of properties? How will this perform compared to, lets say, memcached?

cache['some-long-key-goes-here'] = 'possibly an entire page worth of html'
OMGKurtNilsen
  • 5,048
  • 7
  • 27
  • 36
  • You will likely run into memory limits before language limits doing something like this. – chsh Oct 04 '13 at 20:04
  • Anything can run out of memory. Will it consume more than memcached? More overhead? – OMGKurtNilsen Oct 04 '13 at 20:06
  • 1
    Based on a given node process' memory limits, it will run out of room before approaching memcached's limits. You're asking a lot of grey area questions. To put it clearer: "How will [this potential system that is yet to be written and benchmarked] perform compared to [this other system that is already written in a compiled language and well-known to be performant]?" – chsh Oct 04 '13 at 20:13
  • I don't agree that it's a grey area. Someone here definitely has enough knowledge about javascript and node.js to tell me whether or not this is a viable approach. It's not like I am asking how some complicated code will work, it's just a javascript object. – OMGKurtNilsen Oct 04 '13 at 20:16
  • "How will it perform?" Are you going to add all of the features of memcached (https://code.google.com/p/memcached/wiki/NewOverview). It's not apples-to-apples. You'll be limited to very little RAM in comparison as well. https://github.com/joyent/node/wiki/FAQ#what-is-the-memory-limit-on-a-node-process – WiredPrairie Oct 04 '13 at 20:42
  • How will it perform as nothing else than a key-value cache storage was the question, not how will it perform if I implemented a ton of extra features. – OMGKurtNilsen Oct 04 '13 at 20:57

0 Answers0