From d4b087e06d9d4c5eccc078697289fad8ccffceaf Mon Sep 17 00:00:00 2001 From: Tristan Lee Date: Fri, 25 Aug 2023 13:46:00 -0400 Subject: [PATCH] Add caching to qwik --- examples/v7-qwik/routes.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/examples/v7-qwik/routes.ts b/examples/v7-qwik/routes.ts index 3c49e512a..a4a830e82 100644 --- a/examples/v7-qwik/routes.ts +++ b/examples/v7-qwik/routes.ts @@ -3,5 +3,14 @@ import { Router } from '@edgio/core' import { qwikRoutes } from '@edgio/qwik' +import type { Features } from '@edgio/core/types'; -export default new Router().use(qwikRoutes) +const defaultFeatures: Features = { + caching: { + max_age: '1d', + stale_while_revalidate: '1d', + service_worker_max_age: '1h', + }, +}; + +export default new Router().match('/(.*)', defaultFeatures).use(qwikRoutes);