multi-layer caching into memory, refactor db.js (bug 1012790)
Merge pull request #45 from ngokevin/master

multi-layer caching into memory, refactor db.js (bug 1012790)