Node Webkit clear cache

前端 未结 3 721
南旧
南旧 2021-02-10 09:48

I recently discovered that c:/Users/username/AppData/Local/AppName/Cache contained over 100K cache files.

I read up a bit and saw that the gui.App.cl

3条回答
  •  天涯浪人
    2021-02-10 10:16

    The require cache is apparently only available on global.require.cache.

    Clearing that cache manually made it work for me.

    for(module in global.require.cache){
        if(global.require.cache.hasOwnProperty(module)){
            delete global.require.cache[module];
        }
    }
    location.reload()
    

    Neither the gui.APP.clearCache() nor the gui.Window.get().reloadIgnoringCache() had any effect for me.

提交回复
热议问题