Fixes #3882, honor query cache config