Pārlūkot izejas kodu

Merge pull request #2855 from jaapmarcus/feature/2721-improve-caching

2721 [Feature]  Improve Nginx fastcgi caching
Raphael 3 gadi atpakaļ
vecāks
revīzija
e51b284870

+ 1 - 1
bin/v-add-fastcgi-cache

@@ -81,7 +81,7 @@ chown root:$user $fastcgi
 chmod 640 $fastcgi
 
 str="fastcgi_cache_path /var/cache/nginx/micro/$domain levels=1:2" 
-str="$str keys_zone=$domain:10m max_size=512m inactive=30m;" 
+str="$str keys_zone=$domain:10m max_size=512m inactive=30m use_temp_path=off;" 
 conf='/etc/nginx/conf.d/fastcgi_cache_pool.conf'
 if [ -f "$conf" ]; then
     if [ -z "$(grep "=${domain}:" $conf)" ]; then

+ 1 - 1
install/deb/templates/web/nginx/caching.sh

@@ -7,7 +7,7 @@ home=$4
 docroot=$5
 
 str="proxy_cache_path /var/cache/nginx/$domain levels=1:2" 
-str="$str keys_zone=$domain:10m max_size=256m inactive=30m;" 
+str="$str keys_zone=$domain:10m max_size=256m inactive=30m use_temp_path=off;" 
 conf='/etc/nginx/conf.d/01_caching_pool.conf'
 if [ -e "$conf" ]; then
     if [ -n "$(grep "=${domain}:" $conf)" ]; then

+ 1 - 1
install/rpm/templates/web/nginx/caching.sh

@@ -7,7 +7,7 @@ home=$4
 docroot=$5
 
 str="proxy_cache_path /var/cache/nginx/$domain levels=2" 
-str="$str keys_zone=$domain:10m inactive=60m max_size=512m;" 
+str="$str keys_zone=$domain:10m inactive=60m max_size=512m use_temp_path=off;" 
 conf='/etc/nginx/conf.d/01_caching_pool.conf'
 if [ -e "$conf" ]; then
     if [ -z "$(grep "=${domain}:" $conf)" ]; then