One thing I'm not sure how to do or what order to put them in is using staticCache in conjunction with compress and static middlewares. Does staticCache go before compress?
staticCache needs a bit of love before still. I'm still tempted to remove it, if you have a larger app it doesn't make sense to have a single process in-memory cache. For small apps it is pretty handy but yeah... haha. It doesn't have Vary support yet for example so it wont play nice with compress
do I hear a redisCache in the future :)
nah, I thought about it but it really doesn't make much sense, if you're at that level you should already be using varnish etc. I'm not sure how people even use node-static and a few of the others that just blindly cache in-memory
They don't really work together very well now. It'd make sense to have the staticCache renamed to cache and work on both static and dynamic output if possible to cache (no cookies, appropriate headers etc). Would resemble a tiny reverse proxy.
I already run varnish on the front end and I think it is just the absolute way to go. However, a fallback "cache" middleware would be fine for small and windows based deployments.