Added mongodb caching functionality