Skip to content

Instantly share code, notes, and snippets.

@akashnimare
Created September 6, 2017 22:52
Show Gist options
  • Save akashnimare/99695e876ef95210fa506ba716cc1ab3 to your computer and use it in GitHub Desktop.
Save akashnimare/99695e876ef95210fa506ba716cc1ab3 to your computer and use it in GitHub Desktop.
Clear cach in electron
const {BrowserWindow} = require('electron');
const win = BrowserWindow.getAllWindows()[0];
const ses = win.webContents.session;
ses.clearCache(() => {
alert("Cache cleared!");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment