server: only cache public keys for 15min
Some checks failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/test Pipeline failed
Some checks failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/test Pipeline failed
This commit is contained in:
parent
ab22a1afa0
commit
6501c542b2
1 changed files with 2 additions and 2 deletions
|
@ -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