I was looking at the interplay between staticCache and compress, it looks like resources will be re-compressed on each request even if the file contents themselves are in memory. Being able to cache the compressed version of the resources looks like a very useful thing, as cache + compression is what I would expect to be the norm.
yup we have an issue open for Vary support
I will look at this over the weekend. I will updated #393 with a pull request.
There is gzippo npm library: see https://github.com/tomgallacher/gzippo
There is also https://github.com/mape/connect-assetmanager, which supports gzip if you're using 0.6.x. It also has some nice concatenation, minification, and changing watching features. Which is awesome if your working with js and css.
@nponeccop core has compress() now, but that's not what this issue is about
Gzippo both compresses AND avoids recompression.
connect-assetmanager does, but it not generic. You have define the files and the routes to the files you want to serve. When run on 0.6.x it keeps two copies, one compressed and one uncompressed, and only rebuilds them if the file(s) change(s).
Vary support is in core, right? This shouldn't be too hard to add if desired.
@ryanrolds I dont think we have it right now, we're still missing quite a few reverse proxy cache must-haves
@nponeccop gzippo isn't a cache..
Do we have a list of those must haves somewhere? Issues scattered to the four winds of the issues system?
haha yeah the issues are all a mess right now, Vary and some of the cache-control directives we're ignoring right now for sure
take a look at this: https://github.com/OptimalBits/cabinet it may do what you need...
staticCache will be removed in v3