1
0
mirror of https://github.com/MisskeyIO/misskey synced 2025-01-18 07:43:44 +09:00
This commit is contained in:
syuilo 2021-03-22 15:16:45 +09:00
parent 7c3086e9d9
commit 0e3e90f94f

View File

@ -6,5 +6,5 @@ import { Cache } from './cache';
const cache = new Cache<UserKeypair>(Infinity);
export async function getUserKeypair(userId: User['id']): Promise<UserKeypair> {
return await cache.fetch(userId, async () => await UserKeypairs.findOneOrFail(userId));
return await cache.fetch(userId, () => UserKeypairs.findOneOrFail(userId));
}