D
D
desuvin2015-06-25 18:32:53
JavaScript
desuvin, 2015-06-25 18:32:53

Cache in node-webkit?

How to disable javascript cache in node-webkit. Tried
"webkit": {
"page-cache": false
}
in package.json
Also ticked node-webkit console to not use cache when console is open. I tried to click on both "reload" buttons, but the cache still remains and I have to refresh the page 5-6 times to load the new javascript.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
0
0xD34F, 2018-10-02
bem @bemdev

const resultArray = Object.values(firstArray.reduce((acc, n) => {
  const group = acc[n.id] = acc[n.id] || { id: n.id, offers: [] };
  group.offers.push(n);
  return acc;
}, {}));

D
Dmitry Demin, 2015-06-25
@desuvin

If you use the require function, then the files are loaded and cached in the node context.
I didn’t find any documented solution, so I save myself by clearing the require cache.

var x=global.require.cache;
for (var i in x) delete x[i];
location.reload()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question