refactor(backend): rename cache class

This commit is contained in:
syuilo 2023-03-24 16:43:42 +09:00
parent 4a17906530
commit e438091113
15 changed files with 137 additions and 52 deletions

View file

@ -3,7 +3,7 @@ import { DI } from '@/di-symbols.js';
import type { AccessTokensRepository, AppsRepository, UsersRepository } from '@/models/index.js';
import type { LocalUser } from '@/models/entities/User.js';
import type { AccessToken } from '@/models/entities/AccessToken.js';
import { Cache } from '@/misc/cache.js';
import { KVCache } from '@/misc/cache.js';
import type { App } from '@/models/entities/App.js';
import { UserCacheService } from '@/core/UserCacheService.js';
import isNativeToken from '@/misc/is-native-token.js';
@ -18,7 +18,7 @@ export class AuthenticationError extends Error {
@Injectable()
export class AuthenticateService {
private appCache: Cache<App>;
private appCache: KVCache<App>;
constructor(
@Inject(DI.usersRepository)
@ -32,7 +32,7 @@ export class AuthenticateService {
private userCacheService: UserCacheService,
) {
this.appCache = new Cache<App>(Infinity);
this.appCache = new KVCache<App>(Infinity);
}
@bindThis