share: speed up share loads (#16165)

This commit is contained in:
Shoubhit Dash
2026-03-06 18:19:15 +05:30
committed by GitHub
parent eeeb21ff86
commit 1d9dcd2a27
7 changed files with 167 additions and 145 deletions

View File

@@ -108,6 +108,7 @@ app
validator("param", z.object({ shareID: z.string() })),
async (c) => {
const { shareID } = c.req.valid("param")
c.header("Cache-Control", "public, max-age=30, s-maxage=300, stale-while-revalidate=86400")
return c.json(await Share.data(shareID))
},
)