with the "use cache" directive, is it possible to mark a function as "run at build time only"?
Unanswered
New Zealand posted this in #help-forum

New ZealandOP
with the "use cache" directive, is it possible to mark a function as "run at build time only"?
7 Replies

West African Lion
no thats not how it works
usually functions dont run until first render time as cache usually client-sided
defeats the point of caching in most cases if it still needs to be fetched externally

New ZealandOP
the Next.js "Data Cache" used by "use cache" is definitely not a client-side cache

Yes you can do run at build time only.. without use cache
export const dynamic = force-static

@New Zealand any updates?