remove cache
Some checks failed
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/lint-backend Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline failed
ci/woodpecker/pr/test Pipeline failed

This commit is contained in:
Norm 2022-11-02 17:40:04 -04:00
parent f1efcf260a
commit 4abfacaf16
Signed by: norm
GPG key ID: 7123E30E441E80DE

View file

@ -109,17 +109,15 @@ const nodeinfo2 = async (): Promise<NodeInfo2Base> => {
};
};
const cache = new Cache<NodeInfo2Base>(10 * MINUTE);
router.get(nodeinfo2_1path, async ctx => {
const base = await cache.fetch(null, () => nodeinfo2());
const base = await nodeinfo2();
ctx.body = { version: '2.1', ...base };
ctx.set('Cache-Control', 'public, max-age=600');
});
router.get(nodeinfo2_0path, async ctx => {
const base = await cache.fetch(null, () => nodeinfo2());
const base = await nodeinfo2();
delete base.software.repository;