Reputation:
If I set the $http.get to have a cache like this:
$http.get(url, { cache: true}).success(...);
Then where is the data stored. Is there an object I can check to see this data. Also what is the lifetime of the data? Would the data be lost when I reload a page in the application?
Upvotes: 0
Views: 52
Reputation: 4611
It's keeping so while alive your html page, if the page has been closed or refreshed it will be removed, if you want to clear your cache you should use $cacheFactory provider's removeAll()
function, if you want cache which will be kept for a long time then you should use localStorage
or sessionStorage
Upvotes: 0