How are you generating the content in Lua? Does it involve fetching stuff from a datastore or complex calculations? If so, then caching it in redis would probably help, if not, it may be faster to just recreate it each time. I avoid caching directly in the Lua process because of the 1GB (or 4GB with
https://github.com/Neopallium/mmap_lowmem ) memory limit. Also, I generally use redis for various other things along side nginx most of the time anyway.