tune cache lifetimes

This commit is contained in:
Hazel K 2024-08-03 14:49:06 -04:00
parent 3688f1dadf
commit 672f1ea684
8 changed files with 16 additions and 18 deletions

View file

@ -135,7 +135,7 @@ export class NodeinfoServerService {
return document;
};
const cache = new MemorySingleCache<Awaited<ReturnType<typeof nodeinfo2>>>(1000 * 60 * 10);
const cache = new MemorySingleCache<Awaited<ReturnType<typeof nodeinfo2>>>(1000 * 60 * 10); // 10s
fastify.get(nodeinfo2_1path, async (request, reply) => {
const base = await cache.fetch(() => nodeinfo2(21));