I want to clear cache data in Electron(atom-shell). I don\'t find any api like gui.App.clearCache()(node-webkit api to clear cache data) in Electron. If you find an
We are using this in our app...
const { app, session } = require('electron');
// ...
session.defaultSession.clearStorageData(null, (error: any) => {
// in our case we need to restart the application
// app.relaunch();
// app.exit();
});
Update for Electron 7:
await session.defaultSession.clearStorageData();