Quantcast
Channel: Node Webkit clear cache - Stack Overflow
Viewing all articles
Browse latest Browse all 4

Answer by Josh Lankford for Node Webkit clear cache

$
0
0

Ran into the same issue so I created a quick solution to solve the problem temporarily until I can rely on the native gui.App.clearCache function. This removes the entire Cache directory and recreates it asynchronously.

This requires fs-extra and should work on Linux, OSX and Windows.

var customClearCache = function(){  var dir = path.join(gui.App.dataPath, '/Cache');  fs.remove(dir, function(err) {    if (err) return console.error(err)    fs.mkdirs(dir, function(err) {      if (err) return console.error(err)      // This is where I start my app    });  });};

Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>