Increase cache clean-up interval
| @@ -43,7 +43,7 @@ class DiskCache { | ||
| 43 | 43 | static DIRECTORY = 'characters'; |
| 44 | 44 | |
| 45 | 45 | /** @type {number} */ |
| 46 | 46 | static REMOVAL_INTERVAL = 5 * 60 * 1000; |
| 47 | 47 | |
| 48 | 48 | /** @type {import('node-persist').LocalStorage} */ |
| 49 | 49 | #instance; |
| @@ -78,6 +78,9 @@ class DiskCache { | ||
| 78 | 78 | * @returns {Promise<void>} |
| 79 | 79 | */ |
| 80 | 80 | async #removeCacheEntries() { |
| 81 | + // TODO: consider running this.verify() for a user instead as getting all cache keys | |
| 82 | + // is a heavy operation, since it requires to read all files in the disk cache. | |
| 83 | + | |
| 81 | 84 | try { |
| 82 | 85 | if (!useDiskCache || this.removalQueue.length === 0) { |
| 83 | 86 | return; |