一级缓存是同一个session下的数据共享
~~~
inputStream = Resources.getResourceAsStream("SqlMapConfig.xml");
SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream);
SqlSession sqlSession = sqlSessionFactory.openSession();
SuserMapper suserMapper = sqlSession.getMapper(SuserMapper.class);
suserMapper.getAllUsers();//发送sql语句
suserMapper.getAllUsers();//不发送sql语句
sqlSession.commit();//缓存清除
System.out.println("aaaa");
suserMapper.getAllUsers();//发送sql语句
~~~