Add 'cache_query_string' configuration option

Close #2349