Hi,
The proxy_cache_key uses request parameters by default. As stated in http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_key it uses $scheme$proxy_host$request_uri by default.
The $request_uti do contain the request parameters: http://nginx.org/en/docs/http/ngx_http_core_module.html#var_request_uri
$request_uri
full original request URI (with arguments)
So a way to deal with this is using a self-made cache_key and strip the arguments with a regex:
set $cacheuri $request_uri;
if ($cacheuri ~ /example/images/([^\?]*)) {
set $cacheuri /example/images/$1;
}
proxy_cache_key $cacheuri;
Note: the regex is untested, but just to give you an idea.
JP