share: speed up share loads (#16165)
This commit is contained in:
parent
eeeb21ff86
commit
1d9dcd2a27
7 changed files with 167 additions and 145 deletions
|
|
@ -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))
|
||||
},
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue