Ionic 2 clear app cache

Concerning this issue: http://stackoverflow.com/questions/40264616/ionic-2-clearing-app-cache-on-logout

How is it possible to clear the App cache (not only view cache) of an Ionic 2 app? Is this a proper solution to this:

exec = require('cordova/exec');

// constructor and so on...

clearCache() {
exec(function () {
            console.log('success');
        }, function () {
            console.log('error');
        }, 'Cache', 'clear', []);
}

what would I have to consider by using this approach?