我们也可以使用flushCache=“false”在每次执行后都清空缓存,通过这这个我们还可以控制DML操作完成之后不清空缓存。

<select id="getStudentBySid" resultType="Student" flushCache="true"> select * from student where sid = #{sid} </select>