$http.get('http://server/myapi', {
cache: true
}).success(function() {//Processing success});
$http.get added a cache. I requested records. The first time I requested the data on the URL, I refreshed it many times and never requested data again. . What is the update mechanism for cache here? Under what circumstances can the data on the website be obtained again?
Generally, I recommend AngularCache
https://github.com/jmdobry/angular-cache
Can be set to expire by time
Save cache
var $httpDefaultCache = $cacheFactory.get('$http');
Then you can control
$httpDefaultCache.remove(key);
// key is your url such as /api/user/current/51a9020d91799f1e9b8db12f