Can we use MongoDB as a replacement of Memory Caching library (memcache and memcached).?
and what are the deference in MongoDB and Memory Caching Library.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The biggest problem you have with MongoDB is that it doesn’t naturally and forcefully load everything into memory unlike memcached, which, as in it’s name, is a in-memory key value store.
You have also got to consider that MongoDB does no memory management for itself, it will instead allow the OS to take utter control of it using the native LRU algorithm. I cannot fathom any problems this might give you because I don’t have your data or indexes or queries.
However many people who try to use memcache as a database (which many do) are finding that it isn’t particularly fast at doing that (wasn’t really designed for it) and this is where MongoDB breaks through.
Whether or not MongoDB is a replacement for memcache depends on your need, but then if you need is such that MongoDB needs to replace the cache then you might as well replace SQL with MongoDB as well, that is my honest opinion on the matter because you have blurred the lines between cache and storage.