From 4ddb64adddd4966c00ee40659ed4df9ef8381bc8 Mon Sep 17 00:00:00 2001 From: Aslam H Date: Tue, 10 Sep 2024 12:49:32 +0700 Subject: [PATCH] fix(link): force cache url fetching --- web/components/routes/link/partials/form/link-form.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/components/routes/link/partials/form/link-form.tsx b/web/components/routes/link/partials/form/link-form.tsx index 8e65a2ea..e1f95ead 100644 --- a/web/components/routes/link/partials/form/link-form.tsx +++ b/web/components/routes/link/partials/form/link-form.tsx @@ -118,7 +118,7 @@ export const LinkForm: React.FC = ({ const fetchMetadata = async (url: string) => { setIsFetching(true) try { - const res = await fetch(`/api/metadata?url=${encodeURIComponent(url)}`, { cache: "no-cache" }) + const res = await fetch(`/api/metadata?url=${encodeURIComponent(url)}`, { cache: "force-cache" }) const data = await res.json() setUrlFetched(data.url) form.setValue("url", data.url, {