Levels of caching and impact on the WordPress web site

Adding custom variables(query strings) to static resources doesn’t affect caching at some of the levels you’ve listed above:

  • WordPress plugin caching
  • Webserver software caching
  • PHP opcode caching
  • MySQL caching
  • WordPress query caching
  • Several more etc.

All of these don’t cache static resources(js, css and so on) but rather cache the output of application codes at their different applied levels.

Most Proxy Servers, CDNs and browser cache prevent caching static resources with query strings as it is a common method used for breaking cached objects so caches at the browser cache level for instance would be invalidated when the query strings are updated.

To my knowledge, this might be because caches of static resources are actual copies of the static files stored with the headers and references to the object’s url.