Closed Ignasimg closed 9 years ago
It comes down to caching the right data. You'll have to store your other calls in the exact same format that $http saves them. $http stores the response and all of the meta data, so you'll have to make that other stuff up.
Ok but the problem is with the key name, for some reason it wont let me.cache a key which has a forward slash on it '/'
You can cache with any key, as long as it is a string. Can you provide the stack trace?
OMG, I was trying to isolate the problem to post it here, when I noticed is not about your library, but about my code.
Totally sorry for that!
So I'm using the cache with $http, and for some api calls I receive many many objects.
What I wanted to do is when I call one of those calls, not only cache the answer itself, but also other possible calls that are pointless, because they'll just ask for part of the data already received.
So when I tried to
for some reason it thrown my code to execute the responseError function of the http interceptor service.
I tried removing the slash and it "works" but obviously doesn't cache the entry for the forthcoming http requests.
Thanks!