I want to precompile some Jade templates mostly based on server configuration (so result is static html) upon server startup. Then for every client request I want to serve this content as fast as possible.
There is probably several options, but I am not sure what would most efficient.
- Save in files and stream on every request
- Save in Redis database and stream (not sure how yet) on every request
- Store everything in memory as strings and send on every request
There is maybe more options I don't know about. I was even thinking about creating stream, that can be reused all over again for every request, but it doesn't seems to be possible.
I am not looking for ultimate super solution here, just maybe if you can share your experience on this topic.