Settings

SettingDescriptionValid ValuesDefault
localCacheScopeMyBatis uses local cache to prevent circular references and speed up repeated nested queries. By default (SESSION) all queries executed during a session are cached. If localCacheScope=STATEMENT local session will be used just for statement execution, no data will be shared between two different calls to the same SqlSession.
SESSION | STATEMENTSESSION
cacheEnabledGlobally enables or disables any caches configured in any mapper under this configuration.true | falsetrue

See Also