MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / scheduleClearCache

Function scheduleClearCache

scripts/smoothScroll.js:613–618  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

611 let smoothBehaviorForElement = {};
612 //setInterval(function () { cache = {}; }, 10 * 1000);
613 function scheduleClearCache() {
614 clearTimeout(clearCacheTimer);
615 clearCacheTimer = setInterval(function () {
616 cacheX = cacheY = smoothBehaviorForElement = {};
617 }, 1 * 1000);
618 }
619 function setCache(elems, overflowing, x) {
620 let cache = x ? cacheX : cacheY;
621 for (let i = elems.length; i--; ) cache[uniqueID(elems[i])] = overflowing;

Callers 2

wheelFunction · 0.85
keydownFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected