forked from FoundKeyGang/FoundKey
server: only cache public keys for 15min
This commit is contained in:
parent
ab22a1afa0
commit
6501c542b2
|
@ -18,11 +18,11 @@ export const uriPersonCache = new Cache<User>(
|
|||
async (uri) => await Users.findOneBy({ uri, isDeleted: IsNull() }) ?? undefined,
|
||||
);
|
||||
export const publicKeyCache = new Cache<UserPublickey>(
|
||||
2 * HOUR,
|
||||
15 * MINUTE,
|
||||
(keyId) => UserPublickeys.findOneBy({ keyId }).then(x => x ?? undefined),
|
||||
);
|
||||
export const publicKeyByUserIdCache = new Cache<UserPublickey>(
|
||||
2 * HOUR,
|
||||
15 * MINUTE,
|
||||
(userId) => UserPublickeys.findOneBy({ userId }).then(x => x ?? undefined),
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue