Added a cache for remote requests

* Also added test coverage