By javascript related queries I mean things like these:
- Google Analytics:
http://www.mydomain.com/utm_campaign=CampaignName&utm_medium=Facebook
- Kiss Metrics:
http://www.mydomain.com/[email protected]&kme=SignUp
- Google Adwords:
http://www.mydomain.com/?gclid=XXXXXXXX (this is the trickiest, because X is different string for each visit)
In all cases, the html generated by WP is exactly the same than: http://www.mydomain.com/ so it makes sense to give them that cache.
I've never seen a configuration to solve this and most of my visits come from AdWords or Campaigns (with utms) so there's no point in caching if you are not serving cache to the 90% of your visits.
This is my standard configuration to avoid cache when the url contains a query:
if ($query_string != "") { set $cache_uri 'no cache'; }
As I am quite new to nginx so, could somebody provide an example of how this should be configured to serve "non-query cached files" to "javascript-related query urls"?
Thanks in advance! Luis.