diff --git a/app/routes/index.tsx b/app/routes/index.tsx index ac9a1004..97e6ec18 100644 --- a/app/routes/index.tsx +++ b/app/routes/index.tsx @@ -1,4 +1,9 @@ -import type { MetaFunction, LinksFunction, RouteComponent } from 'remix'; +import type { + MetaFunction, + LinksFunction, + RouteComponent, + HeadersFunction, +} from 'remix'; import { block } from 'remix'; import { FunHoverLink } from '../components/fun-hover-link'; @@ -8,6 +13,11 @@ const meta: MetaFunction = () => ({ description: 'personal website for logan mcansh', }); +const headers: HeadersFunction = () => ({ + 'Cache-Control': + 'public, max-age=3600, s-maxage=3600, stale-while-revalidate=3600', +}); + const links: LinksFunction = () => [ block({ rel: 'preload', @@ -56,4 +66,4 @@ const IndexPage: RouteComponent = () => ( ); export default IndexPage; -export { meta, links }; +export { headers, meta, links };