I would like to be able to cache pages that have a query. E.g, those with a querystring such as www.domain.com?q=search
We're fronting our installation with Akamai, and Akamai is already caching these URLs, but each 15mins Akamai will go back to the origin and fetch straight from the publisher again. Because there is no cached file for this URL. I'd like to change this.
You did it right, the ignoreURLParameters setting ignores the query string and caches the page as if the query string wasn't in the URL. Normally the ignoreURLParameters is used to impact query parameters that don't impact the HTML to be returned, but rather impact the display client side or are used for analytic purposes. Examples might be an email campaign ID, or sorting parameter that is implemented client side. See http://docs.adobe.com/docs/en/dispatcher/disp-config.html#Ignoring URL Parameters. If you want to cache all the variations of a based on they query string you will have to rewrite them to selectors or something similar.