Fixes #3882, honor query cache config

fixes #3882