refactor(backend): rename Cache -> MemoryCache

This commit is contained in:
syuilo
2023-04-04 15:56:47 +09:00
parent a5f76c064e
commit 7f3afac0a2
15 changed files with 54 additions and 54 deletions

View File

@@ -1,7 +1,7 @@
import { Inject, Injectable } from '@nestjs/common';
import type { InstancesRepository } from '@/models/index.js';
import type { Instance } from '@/models/entities/Instance.js';
import { KVCache } from '@/misc/cache.js';
import { MemoryKVCache } from '@/misc/cache.js';
import { IdService } from '@/core/IdService.js';
import { DI } from '@/di-symbols.js';
import { UtilityService } from '@/core/UtilityService.js';
@@ -9,7 +9,7 @@ import { bindThis } from '@/decorators.js';
@Injectable()
export class FederatedInstanceService {
private cache: KVCache<Instance>;
private cache: MemoryKVCache<Instance>;
constructor(
@Inject(DI.instancesRepository)
@@ -18,7 +18,7 @@ export class FederatedInstanceService {
private utilityService: UtilityService,
private idService: IdService,
) {
this.cache = new KVCache<Instance>(1000 * 60 * 60);
this.cache = new MemoryKVCache<Instance>(1000 * 60 * 60);
}
@bindThis