Mybatis的一級緩存和二級緩存

一、簡介java MyBatis提供了支持一級緩存和二級緩存。算法 一級緩存:基於PerpetualCache 的 HashMap本地緩存,其存儲做用域是Session,當session flush或者close時,該session中的cache所有清空。spring 二級緩存:與一級緩存機制相似,也是使用的PerpetualCache的HashMap實現,其做用域是mapper.xml(name
相關文章
相關標籤/搜索