Next.js Discord

Discord Forum

How to enable route caching regardless of origin?

Unanswered
Griffon Nivernais posted this in #help-forum
Open in Discord
Avatar
Griffon NivernaisOP
I have some heavy file I/O that takes 10s to retrieve initially, and a file cache to make it so this is only done once during the application's uptime (very cold start). I know that Next already implements route caching, but it seems to do that only for 1 origin (meaning if I access the site it'll run then cache, and the same will occur on another site). Is there a way to cache the request for all origins and return that instead of caching per-origin?

2 Replies

Avatar
Griffon NivernaisOP
Bump.
Avatar
Griffon NivernaisOP
Bump.