feat(plex-scan): plex scanner improvements (#2105)

This commit is contained in:
Ryan Cohen
2021-09-20 09:39:56 +09:00
committed by GitHub
parent 4c6009bc2c
commit afda9c7dc2
11 changed files with 252 additions and 69 deletions

View File

@@ -1,6 +1,12 @@
import NodeCache from 'node-cache';
export type AvailableCacheIds = 'tmdb' | 'radarr' | 'sonarr' | 'rt' | 'github';
export type AvailableCacheIds =
| 'tmdb'
| 'radarr'
| 'sonarr'
| 'rt'
| 'github'
| 'plexguid';
const DEFAULT_TTL = 300;
const DEFAULT_CHECK_PERIOD = 120;
@@ -48,6 +54,10 @@ class CacheManager {
stdTtl: 21600,
checkPeriod: 60 * 30,
}),
plexguid: new Cache('plexguid', 'Plex GUID Cache', {
stdTtl: 86400 * 7, // 1 week cache
checkPeriod: 60 * 30,
}),
};
public getCache(id: AvailableCacheIds): Cache {