Skip to content

Add option to disable cache check #113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tomeyro opened this issue Sep 18, 2014 · 2 comments
Open

Add option to disable cache check #113

tomeyro opened this issue Sep 18, 2014 · 2 comments

Comments

@tomeyro
Copy link

tomeyro commented Sep 18, 2014

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.

@chieffancypants
Copy link
Owner

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.

@ryanhart2
Copy link

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 angular/angular.js#7429

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants