AngularJS service implements a caching repository pattern around RESTful services