diff --git a/src/index.ts b/src/index.ts index eef8134..a10c0fa 100644 --- a/src/index.ts +++ b/src/index.ts @@ -80,7 +80,7 @@ app.head('*', handleGetHead) // handle both GET and HEAD async function handleGetHead(c: Context) { // actual logic goes here - const urlResult = await c.env.KV.get(c.get('key')) + const urlResult = await c.env.KV.get(c.get('key'), { cacheTtl: 86400 }) if (urlResult == null) { return c.json( @@ -104,7 +104,7 @@ async function handleGetHead(c: Context) { // delete specific key app.delete('*', async (c) => { - const urlResult = await c.env.KV.get(c.get('key')) + const urlResult = await c.env.KV.get(c.get('key'), { cacheTtl: 86400 }) if (urlResult == null) { return c.json(