Revert back to static property

This commit is contained in:
Max Isom 2021-12-03 11:28:50 -05:00
parent 7ff54b9495
commit 29ec1d0092
No known key found for this signature in database
GPG key ID: 25C9B1A7F6798880

View file

@ -10,7 +10,7 @@ import debug from '../utils/debug.js';
@injectable()
export default class FileCacheProvider {
private readonly evictionQueue = new PQueue({concurrency: 1});
private static readonly evictionQueue = new PQueue({concurrency: 1});
private readonly config: Config;
constructor(@inject(TYPES.Config) config: Config) {
@ -87,9 +87,9 @@ export default class FileCacheProvider {
}
private async evictOldestIfNecessary() {
void this.evictionQueue.add(this.evictOldest.bind(this));
void FileCacheProvider.evictionQueue.add(this.evictOldest.bind(this));
return this.evictionQueue.onEmpty();
return FileCacheProvider.evictionQueue.onEmpty();
}
private async evictOldest() {