angular-promise-tracker
angular-promise-tracker copied to clipboard
Active after requests have been satisfied
When $http cache is enabled, the tracker's active() method will sometimes return true after a cache hit.
Could you provide a plunkr?
Hi, I think I've been having the same issue, and this is what I think is going on.
The issue is in promise-tracker-http-interceptor. Deferred promises are referenced by request config. That's fine, except when a request is configured with option cache = true. Let's say we have a request like that, the first time the request is sent, a promise will be created and its response will be cached. Next time the same request is sent, a new promise will be created but the $http will return the cached response which contains a reference to the first promise already resolved
I'll do a pull request
any update on this, or is there a work-around? I have the same problem.. using cache: true results in never resolving the tracker
Hi Matt, Yes there is. I did a pull request a while ago, https://github.com/ajoslin/angular-promise-tracker/pull/64/commits. That should fix it