fix: ensure caching in file explorers

This commit is contained in:
Nicolas Meienberger
2025-11-11 18:01:54 +01:00
parent ff7f6ffad9
commit a1cc89c66e
5 changed files with 9 additions and 11 deletions

View File

@@ -73,8 +73,6 @@ export const repositoriesController = new Hono()
};
});
// c.header("Cache-Control", "public, max-age=10, stale-while-revalidate=60");
return c.json<ListSnapshotsDto>(snapshots, 200);
})
.get("/:name/snapshots/:snapshotId", getSnapshotDetailsDto, async (c) => {
@@ -108,7 +106,7 @@ export const repositoriesController = new Hono()
const result = await repositoriesService.listSnapshotFiles(name, snapshotId, path);
// c.header("Cache-Control", "max-age=300, stale-while-revalidate=600");
c.header("Cache-Control", "max-age=300, stale-while-revalidate=600");
return c.json<ListSnapshotFilesDto>(result, 200);
},

View File

@@ -120,7 +120,7 @@ export const volumeController = new Hono()
path: result.path,
};
// c.header("Cache-Control", "public, max-age=10, stale-while-revalidate=60");
c.header("Cache-Control", "public, max-age=10, stale-while-revalidate=60");
return c.json<ListFilesDto>(response, 200);
})