diff --git a/.gitignore b/.gitignore index 8fb4a0a7..afffe313 100644 --- a/.gitignore +++ b/.gitignore @@ -120,6 +120,7 @@ dist config/*.json config/mscache config/yti-* +config/*.cache *.txt .idea/ diff --git a/src/backend/common/Cache.ts b/src/backend/common/Cache.ts index 4da97cf0..c6faf4ea 100644 --- a/src/backend/common/Cache.ts +++ b/src/backend/common/Cache.ts @@ -90,7 +90,7 @@ export class MSCache { ttl: 0, lruSize: 500, cacheDir: config.connection, - cacheId: 'mscache', + cacheId: 'scrobble.cache', persistInterval: 1 * 1000 * 60, expirationInterval: 1 * 1000 * 60, // 1 minute }); @@ -103,7 +103,7 @@ export class MSCache { flatCache.on('error', onlySaveError); try { logger.debug('Loading cache from file...'); - flatCache.load('mscache'); + flatCache.load('scrobble.cache'); if(loadError !== undefined) { throw loadError; } @@ -116,7 +116,7 @@ export class MSCache { logger.debug('Saved cache to file'); }); } catch (e) { - logger.warn(new Error(`Unable to use file cache at ${path.join(config.connection, 'mscache')}`, {cause: e})); + logger.warn(new Error(`Unable to use file cache at ${path.join(config.connection, 'scrobble.cache')}`, {cause: e})); } secondaryCache = new Keyv({store: flatCache, throwOnErrors: true}); } diff --git a/src/backend/scrobblers/AbstractScrobbleClient.ts b/src/backend/scrobblers/AbstractScrobbleClient.ts index dd77811c..1e3aa3dd 100644 --- a/src/backend/scrobblers/AbstractScrobbleClient.ts +++ b/src/backend/scrobblers/AbstractScrobbleClient.ts @@ -312,7 +312,7 @@ export default abstract class AbstractScrobbleClient extends AbstractComponent i const cachedDLength = cachedDead.length; this.deadLetterScrobbles = cachedDead; - return `Scrobbled from Cache: ${cachedQLength} Queue | ${cachedDLength} Dead Letter`; + return `Scrobbles from Cache: ${cachedQLength} Queue | ${cachedDLength} Dead Letter`; } protected async postInitialize(): Promise {