using mongodb to cache data