cloudflare / Stout

A reliable static website deploy tool
MIT License
751 stars 29 forks source link

Modify Cache-Control max-age on non-versioned files through deploy.yaml config #41

Open zmelamed opened 7 years ago

zmelamed commented 7 years ago

I'd like to be able to configure the Cache-Control time for non-versioned files per environment in my deploy.yaml

Currently it defaults to an arbitrary 60 seconds.

For my purposes I'd like this to be seven days (604800). Google takes the browser caching time of images and other files into account when analyzing page speed for rankings and 60 seconds can lead to a small negative hit to ranking, but a hit nonetheless. 7 days is the point where they no longer flag it as a potential issues.

I'd like it to be a per environment setting so that I can have my staging environment much lower max-age as I'll be updating content frequently there and don't want to have to be busting my local cache frequently.

Alternatively just giving me the option to make everything a versioned file would resolve this, but I don't think that option is on the table.