Complete the code to enable full route caching in Next.js by exporting the correct cache setting.
export const cache = [1];Using "force-cache" enables full route caching in Next.js, which caches the route output.
Complete the code to import the cache function from Next.js for full route caching.
import { [1] } from "next/cache";
The cache function from next/cache is used to enable full route caching.
Fix the error in the code to correctly export full route cache in Next.js.
export const cache = [1];The cache export must be a string "force-cache" to enable full route caching.
Fill both blanks to create a cached fetch function and export full route cache.
import { [1] } from "next/cache"; export const cache = [2];
"no-store" disables caching.Importing cache and exporting "force-cache" enables full route caching.
Fill all three blanks to create a cached fetch function, export full route cache, and use it in a component.
import { [1] } from "next/cache"; export const cache = [2]; export default function Page() { const fetchData = [3](() => fetch('/api/data')); return <div>Data loaded</div>; }
Import cache, export "force-cache", and wrap fetch with cache() to enable full route caching in the component.