title: Set fastcgi_cache_key using original $request_uri without $args
body: <p>I am trying to integrate a WordPress plugin (Jetpack's Related Posts module) which adds query strings to the end of post URLs. I would like to cache URLs with FastCGI while completely ignoring the query strings/<code>$args</code>.</p>
  
  <p>My current config is: <code>fastcgi_cache_key "$scheme$request_method$host$request_uri";</code></p>
  
  <p>I am aware of using <a href="http://community.rtcamp.com/t/using-fastcgi-cache-with-affiliate-tracking-software-lots-of-query-strings/2737" rel="nofollow noreferrer">the solution mentioned here</a> to turn my <code>$skip_cache</code> variable off for URLs containing a certain <code>$arg</code>, which works. However, I want to cache the same result regardless of the value of the <code>$args</code> rather than using a unique cache key for each set of <code>$args</code>.</p>
  
  <p>I am also aware of <a href="https://stackoverflow.com/questions/9084969/nginx-request-uri-without-args">some suggestions</a> to just use <code>$uri</code> in the <code>fastcgi_cache_key</code> rather than <code>$request_uri</code>; however, because <code>$uri</code> is not just the original requested URI minus the <code>$args</code>, something in the WordPress architecture (likely pretty links) forces all requested URIs to return the same cache result (rather than a different result for each page).</p>
  
  <p>Is there any way to truly use the originally requested URI without including the <code>$args</code> in the cache key?</p>