Sets a maximum age (minimum one day) for script storage values, after which they are deleted
لا ينبغي أن لا يتم تثبيت هذا السكريت مباشرة. هو مكتبة لسكبتات لتشمل مع التوجيه الفوقية // @require https://update.greasyfork.org/scripts/562172/1732034/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");