Skip to content

Commit e51b284

Browse files
authored
Merge pull request hestiacp#2855 from jaapmarcus/feature/2721-improve-caching
2721 [Feature] Improve Nginx fastcgi caching
2 parents 4ac3dec + da99878 commit e51b284

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

bin/v-add-fastcgi-cache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ chown root:$user $fastcgi
8181
chmod 640 $fastcgi
8282

8383
str="fastcgi_cache_path /var/cache/nginx/micro/$domain levels=1:2"
84-
str="$str keys_zone=$domain:10m max_size=512m inactive=30m;"
84+
str="$str keys_zone=$domain:10m max_size=512m inactive=30m use_temp_path=off;"
8585
conf='/etc/nginx/conf.d/fastcgi_cache_pool.conf'
8686
if [ -f "$conf" ]; then
8787
if [ -z "$(grep "=${domain}:" $conf)" ]; then

install/deb/templates/web/nginx/caching.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ home=$4
77
docroot=$5
88

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

install/rpm/templates/web/nginx/caching.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ home=$4
77
docroot=$5
88

99
str="proxy_cache_path /var/cache/nginx/$domain levels=2"
10-
str="$str keys_zone=$domain:10m inactive=60m max_size=512m;"
10+
str="$str keys_zone=$domain:10m inactive=60m max_size=512m use_temp_path=off;"
1111
conf='/etc/nginx/conf.d/01_caching_pool.conf'
1212
if [ -e "$conf" ]; then
1313
if [ -z "$(grep "=${domain}:" $conf)" ]; then

0 commit comments

Comments
 (0)