When using angular $http, you can set the request configuration cache property to true and the response will be stored. Next time the same request is made, the response is served from the cache without sending a request to the server (docs).
How do you add a (key,val) pair to this cache without performing the http request?
I want to do something like
cache.put("/api/country/uk", someData)
and when $http.get("/api/country/uk") is called later, the cached data is used instead of making the http request.