Sometimes it would be nice to cache all $htto calls to localStorage. This could make sense for very static data sources or to reduce the cost of using paid http services (like Google APIs).
I've taken a stab at implementing a cache by overriding the get() and put() methods of the $cacheFactory here:
To use, just include the 'Cacher' service in your code (and as a dependency of your module/application). Next inject and pass CacheLocal as the cache option to all your $http calls.
$http.get(url, {cache: CacheLocal});
The first time the URL is requested it will be fetched via HTTP, thereafter fetched from localStorage.
Feedback welcome as well as better ways of doing this - perhaps via http interceptors?