Skip to content

Commit 8b57860

Browse files
zc-devsdekobon
authored andcommitted
Improve cache config and documentation
1 parent f491aaf commit 8b57860

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

docs/getting_started.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ running as a Container or as a Systemd service.
3030
| `APPEND_SLASH_FOR_POSSIBLE_DIRECTORY` | No | `true`, `false` | `false` | Flag enabling the return a 302 with a `/` appended to the path. This is independent of the behavior selected in `ALLOW_DIRECTORY_LIST` or `PROVIDE_INDEX_PAGE`. |
3131
| `DIRECTORY_LISTING_PATH_PREFIX` | No | | | In `ALLOW_DIRECTORY_LIST=true` mode [adds defined prefix to links](#configuring-directory-listing) |
3232
| `DNS_RESOLVERS` | No | | | DNS resolvers (separated by single spaces) to configure NGINX with |
33-
| `PROXY_CACHE_MAX_SIZE` | No | | | Limits cache size |
34-
| `PROXY_CACHE_INACTIVE` | No | | | Cached data that are not accessed during the time specified by the parameter get removed from the cache regardless of their freshness |
35-
| `PROXY_CACHE_VALID_OK` | No | | | Sets caching time for response code 200 and 302 |
36-
| `PROXY_CACHE_VALID_NOTFOUND` | No | | | Sets caching time for response code 404 |
37-
| `PROXY_CACHE_VALID_FORBIDDEN` | No | | | Sets caching time for response code 403 |
33+
| `PROXY_CACHE_MAX_SIZE` | No | | `10g` | Limits cache size |
34+
| `PROXY_CACHE_INACTIVE` | No | | `60m` | Cached data that are not accessed during the time specified by the parameter get removed from the cache regardless of their freshness |
35+
| `PROXY_CACHE_VALID_OK` | No | | `1h` | Sets caching time for response code 200 and 302 |
36+
| `PROXY_CACHE_VALID_NOTFOUND` | No | | `1m` | Sets caching time for response code 404 |
37+
| `PROXY_CACHE_VALID_FORBIDDEN` | No | | `30s` | Sets caching time for response code 403 |
3838
| `PROVIDE_INDEX_PAGE` | No | `true`, `false` | `false` | Flag which returns the index page if there is one when requesting a directory. Cannot be enabled with `ALLOW_DIRECTORY_LIST`. |
3939
| `JS_TRUSTED_CERT_PATH` | No | | | Enables the `js_fetch_trusted_certificate` directive when retrieving AWS credentials and sets the path (on the container) to the specified path |
4040
| `HEADER_PREFIXES_TO_STRIP` | No | | | A list of HTTP header prefixes that exclude headers client responses. List should be specified in lower-case and a semicolon (;) should be used to as a deliminator between values. For example: `x-goog-;x-something-` |

standalone_ubuntu_oss_install.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -364,14 +364,6 @@ http {
364364
365365
#gzip on;
366366
367-
# Settings for S3 cache
368-
proxy_cache_path /var/cache/nginx/s3_proxy
369-
levels=1:2
370-
keys_zone=s3_cache:10m
371-
max_size=10g
372-
inactive=60m
373-
use_temp_path=off;
374-
375367
include /etc/nginx/conf.d/*.conf;
376368
}
377369
EOF
@@ -383,6 +375,7 @@ download "common/etc/nginx/include/awssig4.js" "/etc/nginx/include/awssig4.js"
383375
download "common/etc/nginx/include/s3gateway.js" "/etc/nginx/include/s3gateway.js"
384376
download "common/etc/nginx/include/utils.js" "/etc/nginx/include/utils.js"
385377
download "common/etc/nginx/templates/default.conf.template" "/etc/nginx/templates/default.conf.template"
378+
download "common/etc/nginx/templates/cache.conf.template" "/etc/nginx/templates/cache.conf.template"
386379
download "common/etc/nginx/templates/gateway/v2_headers.conf.template" "/etc/nginx/templates/gateway/v2_headers.conf.template"
387380
download "common/etc/nginx/templates/gateway/v2_js_vars.conf.template" "/etc/nginx/templates/gateway/v2_js_vars.conf.template"
388381
download "common/etc/nginx/templates/gateway/v4_headers.conf.template" "/etc/nginx/templates/gateway/v4_headers.conf.template"

0 commit comments

Comments
 (0)