Skip to content

Commit a9ae015

Browse files
committed
refactor: update cache usage in live data fetching functions
- Changed cache directive from "use cache" to "use cache: remote" in the `sanityFetchStaticParams` and `sanityFetchMetadata` functions to clarify the caching strategy. - This update enhances the understanding of data fetching behavior in relation to remote caching.
1 parent 93b687c commit a9ae015

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/web/sanity/lib/live.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export async function sanityFetchStaticParams<
5656
query: QueryString;
5757
params?: QueryParams;
5858
}) {
59-
"use cache";
59+
"use cache: remote";
6060
const { data } = await sanityFetch({
6161
query,
6262
params,
@@ -80,7 +80,7 @@ export async function sanityFetchMetadata<const QueryString extends string>({
8080
params?: QueryParams;
8181
perspective: LivePerspective;
8282
}) {
83-
"use cache";
83+
"use cache: remote";
8484
const { data } = await sanityFetch({
8585
query,
8686
params,

0 commit comments

Comments
 (0)