-
Got a Would like to have this run asynchronously once when the remix server starts so content is pre-cached. Originally, tried to create a standalone script to run during build but this proved impractical as a lot of code depends on the aliases that the tsconfig specifies that are not supported by a regular node js script file. Where would it live? Was originally thinking it could be placed in Is there a good place to do something like that? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The reason module-level variables are reinitialized on every request is due to In development you should store your cache on the See the Jokes tutorial where it discusses how to maintain the database connection. |
Beta Was this translation helpful? Give feedback.
The reason module-level variables are reinitialized on every request is due to
<LiveReload/>
In development you should store your cache on the
global
object to survive the purge.See the Jokes tutorial where it discusses how to maintain the database connection.