Mybatis version: 3.2.7/3.2.8
Just go when it begins to login query database, but to the back, the data returned is all the previous query data, check information that the cache is shut, but no effect,
Another thread is in timing query of data in the database, or a similar situation, but every time I get new sqlsession query data access database data, if use a sqlsession database will not go, all cached data,
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Mapper annotations used on
@ the Options (flushCache=true)
List
The XML file and flushCache="true" useless
Select
CodePudding user response:
Every time a most the very way is change the execution of SQL, the cache mechanism is every time to check whether the same, if the same is in the cache access; And try to release the cache, after completion of each releaseCodePudding user response:
Finduserbyuser code inside outCodePudding user response:
This is the code and the service layer UserMapper. The XML code
CodePudding user response: