MyBatis之cache缓存配置

  1. <cache eviction="FIFO" flushInterval="86400000" size="1000" readOnly="true"/>

  2. <select resultMap="location_result" parameterType="java.util.Map" id="list" flushCache="false" useCache="true">

  3. <insert parameterType="Location" id="add" flushCache="true">

  1. LRU – Least Recently Used: Removes objects that haven't been used for the longst period of time.

  2. FIFO – First In First Out: Removes objects in the order that they entered the cache.

  3. SOFT – Soft Reference: Removes objects based on the garbage collector state and the rules of Soft References.

  4. WEAK – Weak Reference: More aggressively removes objects based on the garbage collector state and rules of Weak References.

你可能感兴趣的:(mybatis,cache)