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));