test query cache exceptions