How to clear the cache data in Electron(atom shell)?

后端 未结 8 863
有刺的猬
有刺的猬 2020-12-13 18:48

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

8条回答
  •  無奈伤痛
    2020-12-13 18:58

    you could try mainWindow.webContents.clearHistory(); or deleting contents in the app Cache folders (will be recreated on app run). You can get the path with app.getPath('userData') + '/Cache'

提交回复
热议问题