Answer the question
In order to leave comments, you need to log in
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
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;
}, {}));
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 questionAsk a Question
731 491 924 answers to any question