Mongodb caching,refactoring...