From a2eac9fff67f811ed4ac1a80a88fd1f0eafae6c8 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 19 Sep 2022 03:11:50 +0900 Subject: test --- packages/backend/src/core/FederatedInstanceService.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'packages/backend/src/core/FederatedInstanceService.ts') diff --git a/packages/backend/src/core/FederatedInstanceService.ts b/packages/backend/src/core/FederatedInstanceService.ts index 24bedd8192..a4894a4376 100644 --- a/packages/backend/src/core/FederatedInstanceService.ts +++ b/packages/backend/src/core/FederatedInstanceService.ts @@ -8,7 +8,7 @@ import { UtilityService } from './UtilityService.js'; @Injectable() export class FederatedInstanceService { - #cache: Cache; + private cache: Cache; constructor( @Inject(DI.instancesRepository) @@ -17,13 +17,13 @@ export class FederatedInstanceService { private utilityService: UtilityService, private idService: IdService, ) { - this.#cache = new Cache(1000 * 60 * 60); + this.cache = new Cache(1000 * 60 * 60); } public async registerOrFetchInstanceDoc(host: string): Promise { host = this.utilityService.toPuny(host); - const cached = this.#cache.get(host); + const cached = this.cache.get(host); if (cached) return cached; const index = await this.instancesRepository.findOneBy({ host }); @@ -36,10 +36,10 @@ export class FederatedInstanceService { lastCommunicatedAt: new Date(), }).then(x => this.instancesRepository.findOneByOrFail(x.identifiers[0])); - this.#cache.set(host, i); + this.cache.set(host, i); return i; } else { - this.#cache.set(host, index); + this.cache.set(host, index); return index; } } -- cgit v1.2.3-freya