Cache

This org.mybatis.scala.cache package provides some aliases to core MyBatis Cache types.

See the API docs for more info about caching.

The only thing you have to do is call the cache method of the space, all parameters are optional, and by default they are set to sensible values.

val config = Configuration("mybatis.xml")
config.addSpace("mynamespace") { space =>

    space cache(eviction=FIFO)

    space += findPeople
    space ++= PersonDAO
    space ++= Seq(deletePerson, updatePerson, ...)

    ...

}

Notice Call the cache method earliest in the space block.