问题
Possible Duplicate:
Embedded MongoDB when running integration tests
I want to use In-Memory mode for unit test, is there an in In-Memory mode like RavenDB?
回答1:
There is no in-memory mode for MongoDB. As per this link, this feature won't be included until at least MongoDB 2.8.
Though since it's using Memory-mapped IO, it should be as speedy as in-memory during the actual processing. Not the startup though.
Also, there's a hack to use RAM disk drive and put your mongo db there. That way it would be entirely in memory.
来源:https://stackoverflow.com/questions/10005697/does-mongo-db-have-an-in-memory-mode