MCPcopy Index your code
hub / github.com/ClearURLs/Addon / deferSaveOnDisk

Function deferSaveOnDisk

core_js/storage.js:92–104  ·  view source on GitHub ↗

* Schedule to save a key to disk in 30 seconds. * @param {String} key

(key)

Source from the content-addressed store, hash-verified

90 * @param {String} key
91 */
92function deferSaveOnDisk(key) {
93 if (hasPendingSaves) {
94 pendingSaves.add(key);
95 return;
96 }
97
98 setTimeout(function () {
99 saveOnDisk(Array.from(pendingSaves));
100 pendingSaves.clear();
101 hasPendingSaves = false;
102 }, 30000);
103 hasPendingSaves = true;
104}
105
106/**
107 * Start sequence for ClearURLs.

Callers 3

increaseTotalCounterFunction · 0.85
increaseCleanedCounterFunction · 0.85
pushToLogFunction · 0.85

Calls 3

saveOnDiskFunction · 0.85
addMethod · 0.80
clearMethod · 0.80

Tested by

no test coverage detected