32

聊聊在AOP模式下的缓存方案-Java_老男孩

 4 years ago
source link: https://blog.51cto.com/14230003/2443711
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
面向方法的数据集缓存使用了autofac做为ioc容器,使用Autofac.Extras.DynamicProxy2作为方法拦截器,缓存面向方法,直接在方法上添加CachingAttribute特性即可。缓存注册流程关于方法拦截器缓存名称设计添加ioc添加拦截器与接口的绑定在对应的接口实现类里,为方法添加CachingAttribute缓存get,remove的作用关于方法拦截器方法拦截器是AOP

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK