This is a WebView cache plugin for Cordova 5.4.0 supporting Android (>=2.3.3) and iOS(>=6.0) It allows the app to use javascript to initiate a cordova webview cache clear
There are two methods:
clear(successCallback, errorCallback)
cleartemp()
You may use cordova-cli
as follows:
cordova plugin add https://github.com/andxyz/cordova-plugin-cache.git
document.addEventListener('deviceready', onDeviceReady);
function onDeviceReady() {
var success = function(status) {
alert('Message: ' + status);
}
var error = function(status) {
alert('Error: ' + status);
}
window.cache.clear(success, error);
window.cache.cleartemp();
}