For the purposes of this example let's say the endpoint/URL is /myapp
/myapp /myapp?arg1=value1 /myapp?arg1=value1&arg2=value2
... will all be needlessly cached as different entries in Varnish, after having needlessly hit the back-end once, and when
comes along, the same will happen. What we want is for Varnish to "ignore" everything after /myapp
Configure your front-end application to read/write the arguments as a URI fragment instead of GET request arguments.
That is, replace the first "?" with "#" making the previous requests look like:
/myapp /myapp#arg1=value1 /myapp#arg1=value1&arg2=value2 /myapp#arg1=value1&arg2=value2&arg3=value3
With this URL structure all the above pages would be cached/served as a single entry in Varnish as browsers will not send the URI fragment to the server.