There are some good responses to this question here: NGINX: Ignoring Certain URL Parameters for Cache Purposes
But I cannot seem to get it to work. I'm running a wordpress install and here is my mapping:
map $args $cachestep1 {
default $args;
~^(fbclid=[^&]*&?)(.*)$ $2;
~^([^&]*)(&fbclid=[^&]*)(&?.*)$ $1$3;
}
And my cachekey:
fastcgi_cache_key $scheme$host$request_method$uri$cachestep1;
I still get cache MISS on the exact same urls with different fbclids.