From 3e6e0e13b2926ff9e1e80bbd9fb23a1ab080b600 Mon Sep 17 00:00:00 2001 From: Dakota Dutko Date: Thu, 29 Feb 2024 16:06:28 -0500 Subject: [PATCH] Forced refresh method (#1998) Fixes #1996. --- .../_gcn.circulars.$circularId.($version)/route.tsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/routes/_gcn.circulars.$circularId.($version)/route.tsx b/app/routes/_gcn.circulars.$circularId.($version)/route.tsx index 3f638503b..378b3eba4 100644 --- a/app/routes/_gcn.circulars.$circularId.($version)/route.tsx +++ b/app/routes/_gcn.circulars.$circularId.($version)/route.tsx @@ -19,11 +19,7 @@ import { FrontMatter } from './FrontMatter' import DetailsDropdownButton from '~/components/DetailsDropdownButton' import DetailsDropdownContent from '~/components/DetailsDropdownContent' import { feature, origin } from '~/lib/env.server' -import { - getCanonicalUrlHeaders, - pickHeaders, - publicStaticShortTermCacheControlHeaders, -} from '~/lib/headers.server' +import { getCanonicalUrlHeaders, pickHeaders } from '~/lib/headers.server' import { useSearchString } from '~/lib/utils' import { useFeature } from '~/root' import type { BreadcrumbHandle } from '~/root/Title' @@ -50,12 +46,15 @@ export async function loader({ return json(result, { headers: { - ...publicStaticShortTermCacheControlHeaders, ...getCanonicalUrlHeaders(new URL(`/circulars/${circularId}`, origin)), }, }) } +export function shouldRevalidate() { + return true +} + export const headers: HeadersFunction = ({ loaderHeaders }) => pickHeaders(loaderHeaders, ['Link'])