This is forked project from https://github.com/moderna/cordova-plugin-cache for clearing WebView cache. For android it deletes the cache folder (total clear of cache).
There is one method:
- clear(successCallback, errorCallback)
You may use phonegap CLI as follows:
โ phonegap local plugin add https://github.com/moderna/cordova-plugin-cache.git [phonegap] adding the plugin: https://github.com/moderna/cordova-plugin-cache.git [phonegap] successfully added the plugin
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 );
}