xwqiang / daocache Goto Github PK
View Code? Open in Web Editor NEWThis project forked from fangoxyz/daocache
NutzDao的缓存扩展,依赖Druid DataSource 和 Ehcache
This project forked from fangoxyz/daocache
NutzDao的缓存扩展,依赖Druid DataSource 和 Ehcache
2015-5-30 1.解决了缓存穿透问题,当有相同sql正在读取数据库时,等待另一条相同sql执行结束,并等待另一条相同sql将数据写入缓存,然后本条sql直接到缓存中读数据,不走数据库. 在并发时,相同的sql会重复从数据库中读取数据,导致缓存无效。此处并非简单地加锁,而是使用了一个带线程名字的线程池,当线程池中没有重复的sql则正常读取,当发现线程中有和本条sql相同的 sql语句正在读取数据库时,则阻塞本线程,等待另一条sql语句从数据库中取出数据后,直接去缓存中取数据,减轻数据库压力。 以上描述的场景在应用启动或高并发时非常明显,此方法非常有效地解决了此问题。 2.解决关联关系初始化时不能写入缓存的问题,可能是由于ehcache缓存还未完全启动时写入缓存导致. 2015-5-24 1.解决了根据主键update或delete时,不认为是主键的问题 2.解决了insert into语句不会清除缓存的问题 2015-5-19 1.根据兽解决的缓存保存Null值的问题的原理,做了一些修改. 2.增加1级,如t_user的一级缓存为t_user_L1___ 3.增加了缓存之间的关联关系,用于多表查询以及视图查询,多表查询时缓存名使用##连接,如t_user##t_usergroup,当清除t_user表的缓存时会清除缓存名为t_user##t_usergroup的缓存. 4.多表查询以及视图查询相当于L3 2015-5-19前 1.ehcache.xml是配置ehcache文件,放在classes目录 2.dao.js文件通过js文式配置daocache需要缓存的表,以及配置DaoExecutor以及NutDaoExt
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.