Improved query strings caching
This commit is contained in:
@@ -13,6 +13,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||||||
- MariaDB 10.5 support (installed by default)
|
- MariaDB 10.5 support (installed by default)
|
||||||
- Upgrade to MariaDB 10.5 with `wo stack migrate --mariadb`
|
- Upgrade to MariaDB 10.5 with `wo stack migrate --mariadb`
|
||||||
|
|
||||||
|
#### Changed
|
||||||
|
|
||||||
|
- Improved Nginx caching rules to cache requests with query strings related to analytics (utm_, fbclid)
|
||||||
|
|
||||||
#### Fixed
|
#### Fixed
|
||||||
|
|
||||||
- Useless php-cli version removal
|
- Useless php-cli version removal
|
||||||
|
|||||||
@@ -60,11 +60,25 @@ map $http_user_agent $mobile_prefix {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# do not cache requests with query strings
|
# do not cache requests with query strings
|
||||||
map $is_args $query_no_cache {
|
map $is_args $is_args_no_cache {
|
||||||
default 1;
|
default 1;
|
||||||
"" 0;
|
"" 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# cache requests with query string related to analytics
|
||||||
|
map $args $args_to_cache {
|
||||||
|
default 0;
|
||||||
|
"~*utm_" 1;
|
||||||
|
"~*fbclid" 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
# do not cache requests with query strings excepted analytics related queries
|
||||||
|
map $is_args_no_cache$args_to_cache $query_no_cache {
|
||||||
|
defaut 1;
|
||||||
|
00 0;
|
||||||
|
11 0;
|
||||||
|
}
|
||||||
|
|
||||||
# if all previous check are passed, $skip_cache = 0
|
# if all previous check are passed, $skip_cache = 0
|
||||||
map $http_request_no_cache$cookie_no_cache$uri_no_cache$query_no_cache $skip_cache {
|
map $http_request_no_cache$cookie_no_cache$uri_no_cache$query_no_cache $skip_cache {
|
||||||
default 1;
|
default 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user