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

后端 未结 8 840
有刺的猬
有刺的猬 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 19:20

    when you are developing, in developer tools go to the tab application and in clear storage and clear site data

    0 讨论(0)
  • 2020-12-13 19:21

    You can use session.clearCache api.

    var remote = require('remote'); 
    var win = remote.getCurrentWindow();
    win.webContents.session.clearCache(function(){
    //some callback.
    });
    
    0 讨论(0)
提交回复
热议问题