From 038f80db03436aded04cf27d190151eb3c74a8f4 Mon Sep 17 00:00:00 2001 From: Erisa A Date: Thu, 23 Mar 2023 23:30:40 +0000 Subject: [PATCH] Increase cacheTtl to 1 day --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(