i have read so many blogs it says there is a bug in
$scope.logout = function() {
$ionicHistory.clearCache();
$ionicHistory.clearHistory();
$state.go('home');
};
is there any solution for clearing cache using ionic code or using some angular code??
logout = function() { $ionicHistory. clearCache(); $ionicHistory. clearHistory(); $state.go('home'); };
Angular cache There is no command to clear the cache, just run rm -rf .
What is the advantage of caching the views in Ionic apps? Provide examples. Ionic by default caches up to ten views, which improves performance and also maintains different states in the views at the same time. For example, the cache can maintain scroll position in the views or active state of buttons.
using this plugin you can clear cache
Follow this steps
1) install this plugin https://www.npmjs.com/package/cordova-plugin-cache
2)write this line where you want to clear your cache
window.cache.clear()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With