README.md in s3_website-2.8.6 vs README.md in s3_website-2.9.0

- old
+ new

@@ -89,12 +89,16 @@ ## Additional features ### Cache Control -You can use the `max_age` configuration option to enable more effective browser -caching of your static assets. There are two possible ways to use the option: +You can use either the setting `max_age` or `cache_control`to enable more +effective browser caching of your static assets. + +#### max_age + +There are two possible ways to use the option: you can specify a single age (in seconds) like so: ```yaml max_age: 300 ``` @@ -106,15 +110,27 @@ max_age: "assets/*": 6000 "*": 300 ``` -Place the configuration into the file `s3_website.yml`. - After changing the `max_age` setting, push with the `--force` option. Force-pushing allows you to update the S3 object metadata of existing files. +#### cache_control + +The `cache_control` setting allows you to define an arbitrary string that s3_website +will put on all the S3 objects of your website. + +Here's an example: + +```yaml +cache_control: public, no-transform, max-age=1200, s-maxage=1200 +``` + +After changing the `cache_control` setting, push with the `--force` option. +Force-pushing allows you to update the S3 object metadata of existing files. + ### Gzip Compression If you choose, you can use compress certain file types before uploading them to S3. This is a recommended practice for maximizing page speed and minimizing bandwidth usage. @@ -154,9 +170,11 @@ s3_endpoint: ap-northeast-1 ``` The valid `s3_endpoint` values consist of the [S3 location constraint values](http://docs.amazonwebservices.com/general/latest/gr/rande.html#s3_region). + +Note that at the moment s3_website does not support the *eu-central-1* region. ### Ignoring files you want to keep on AWS Sometimes there are files or directories you want to keep on S3, but not on your local machine. You may define a regular expression to ignore files like so: