angular-loading-bar
angular-loading-bar copied to clipboard
Add option to disable cache check
It would be nice if you added an option to disable the cache check. We are attaching a custom param to the url in some request to avoid getting the cached response, but angular-loading-bar still recognizes the request as cached.
Custom param? You mean an additional param to the $http config object or adding a query string param to the url? Adding a randomized query string param should definitely work.
As far as programatically handling this as part of the library, I'm happy to take a PR, but I'm not in need of something like this myself.
angular-loading-bar checks the cache using config.url
var cached = cache !== undefined ?
cache.get(config.url) !== undefined : false;
angular caches responses using both config.url and config.params
var url = buildUrl(config.url, config.params);
if (cache) {
cachedResp = cache.get(url);
The buildUrl function is not part of the public api, but there is an open issue for this https://github.com/angular/angular.js/issues/7429