-
Notifications
You must be signed in to change notification settings - Fork 946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
讨论一下Dao的缓存实现 #844
Comments
var ioc = {
}; |
为了保持代码的扩展性,我是直接通过配置的方式,而不用注解的方式来实现 |
缓存的同步机制与缓存粒度的问题如何解决? |
厄,缓存的需求很旺盛? |
@zozoh |
@zozoh nutz和ssh相比少一个hibernate的缓存,为什么有人用mybatis+nutz mvc,肯定有原因 |
@Wizzercn 这不是讨论mybatis 的issue |
受限于 #849 ,等待之 |
fetchlinks的问题解决了,继续 多表查询 自定义sql 和视图的问题 |
https://github.com/fangoxyz/DaoCache 2.一级缓存的key是主键值,缓存命名:t_user的一级缓存为t_user_L1___ ,一级缓存中存放的是单条记录。 3.二级缓存中存放的是基本表的非主键查询的数据,比如select * from t_user where id>0。二级缓存不包括视图和多表查询的缓存。 4.三级缓存存放视图和多表查询数据,并且使用cacheLinks的关系关联与二级缓存关联。 多表查询时缓存名使用##连接,如t_user##t_usergroup,当清除t_user表的缓存时会清除缓存名为t_user##t_usergroup的缓存. 5.二三级缓存的key是sql的sha值 |
恩, 算是ok了 |
代码存放到nutzmore项目中
基本步骤:
依赖:
druid的sql处理器
需要添加/修改的内容:
可能遇到的问题:
The text was updated successfully, but these errors were encountered: