fix: fix cache duration

This commit is contained in:
tdurieux
2021-09-10 11:59:21 +02:00
parent ea3a696556
commit 89e9c60942
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ router.get(
anonymizedPath.substring(anonymizedPath.lastIndexOf("/") + 1)
);
// cache the file for 5min
res.header('Cache-Control', 'max-age=250000');
res.header('Cache-Control', 'max-age=300');
await f.send(res);
} catch (error) {
return handleError(error, res);
+2 -2
View File
@@ -34,7 +34,7 @@ router.get(
res.attachment(`${repo.repoId}.zip`);
// cache the file for 6 hours
res.header("Cache-Control", "max-age=21600000");
res.header("Cache-Control", "max-age=21600");
await pipeline(repo.zip(), res);
} catch (error) {
handleError(error, res);
@@ -49,7 +49,7 @@ router.get(
if (!repo) return;
try {
// ache the file for 6 hours
res.header("Cache-Control", "max-age=21600000");
res.header("Cache-Control", "no-cache");
res.json(await repo.anonymizedFiles({ includeSha: false }));
} catch (error) {