Усталёўвае максімальны ўзрост (мінімум адзін дзень) для значэнняў сховішча скрыптоў, пасля якога яны выдаляюцца
As of
This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greasyfork.org/scripts/562172/1731981/Temporary-Script-Storage.js
Прыклад выкарыстання:
const persistentStorage = new TTLStorage();
await persistentStorage.ready();
setInterval(() => persistentStorage.sweepExpiredEntries(), 1000 * 60 * 60 * 24);
persistentStorage.set("key1", "hello");
const msg = persistentStorage.get("key1");