mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 02:28:05 -07:00
Optimize file cache performance
This commit is contained in:
parent
e28fc98ea0
commit
168fd81eaf
1 changed files with 8 additions and 3 deletions
|
@ -105,13 +105,13 @@ http {
|
|||
error_page 502 503 504 /error/50x.html;
|
||||
|
||||
|
||||
# Cache
|
||||
proxy_cache_path /var/cache/nginx levels=2 keys_zone=cache:10m inactive=60m max_size=512m;
|
||||
# Cache settings
|
||||
proxy_cache_path /var/cache/nginx levels=2 keys_zone=cache:10m inactive=60m max_size=1024m;
|
||||
proxy_cache_key "$host$request_uri $cookie_user";
|
||||
proxy_temp_path /var/cache/nginx/temp;
|
||||
proxy_ignore_headers Expires Cache-Control;
|
||||
proxy_cache_use_stale error timeout invalid_header http_502;
|
||||
proxy_cache_valid any 3d;
|
||||
proxy_cache_valid any 1d;
|
||||
|
||||
map $http_cookie $no_cache {
|
||||
default 0;
|
||||
|
@ -119,6 +119,11 @@ http {
|
|||
~wordpress_logged_in 1;
|
||||
}
|
||||
|
||||
# File cache settings
|
||||
open_file_cache max=10000 inactive=30s;
|
||||
open_file_cache_valid 60s;
|
||||
open_file_cache_min_uses 2;
|
||||
open_file_cache_errors off;
|
||||
|
||||
# Wildcard include
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue