Fixes #3882, honor query cache config
Clean forgotten lines
Merge pull request #4170 from emrahkocaman/fix/master/hibernate

Fixes #3882, honor query cache config