From b2a349ce97be79333316150bf090a495974dd913 Mon Sep 17 00:00:00 2001 From: Nathan Booker Date: Sat, 23 Aug 2025 11:53:20 -0500 Subject: [PATCH] Bump TTL for URL lookups in with-routes middleware to 24 hours --- .changeset/chilly-melons-go.md | 5 +++++ core/middlewares/with-routes.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/chilly-melons-go.md diff --git a/.changeset/chilly-melons-go.md b/.changeset/chilly-melons-go.md new file mode 100644 index 0000000000..486d47842d --- /dev/null +++ b/.changeset/chilly-melons-go.md @@ -0,0 +1,5 @@ +--- +"@bigcommerce/catalyst-core": patch +--- + +Bump TTL for URL lookups in with-routes middleware to 24 hours diff --git a/core/middlewares/with-routes.ts b/core/middlewares/with-routes.ts index 162c7f52d5..4eb17f3da3 100644 --- a/core/middlewares/with-routes.ts +++ b/core/middlewares/with-routes.ts @@ -183,7 +183,7 @@ const updateRouteCache = async ( ): Promise => { const routeCache: RouteCache = { route: await getRoute(pathname, channelId), - expiryTime: Date.now() + 1000 * 60 * 30, // 30 minutes + expiryTime: Date.now() + 1000 * 60 * 60 * 24, // 24 hours }; event.waitUntil(kv.set(kvKey(pathname, channelId), routeCache));