Hey,
I found the Problem.
if ($query_string != “”) {
set $cache_uri ‘null cache’;
}
This prevents all requests with query strings being served cached version.
I had a a lot of traffic from facebook so a lot of requests were sent to php-fpm and not served from cache.
Links from facebook add arguments to the link in this format:
https://www.example.com/?fbclid=xxxxxxxxxx
All tests I did with my website did not include query strings. Therefore I only saw cashed pages.
My solution to this:
if ($request_uri ~ “([^\?]*)\?(.*)fbclid=([^&]*)&?(.*)”) {
set $cache_uri $1;
}
It removes all query strings from variable “cached_uri” if the expression “fbclid” is present.
-
This reply was modified 2 years, 6 months ago by dfbfsndsngr.