首页 | 本学科首页   官方微博 | 高级检索  
     

SSH架构中方法级缓存依赖的解决方案
引用本文:杨树林,胡洁萍. SSH架构中方法级缓存依赖的解决方案[J]. 北京印刷学院学报, 2012, 20(2): 48-50,54
作者姓名:杨树林  胡洁萍
作者单位:北京印刷学院,北京,102600;北京印刷学院,北京,102600
基金项目:北京印刷学院校级重点项目(E-a-2012-28)
摘    要:缓存是提高系统性能的重要手段之一。实现缓存依赖就是要在被依赖对象与缓存对象之间建立一个有效关联,使数据得到合理的刷新。通过对EhCache、Map、An-notation以及AOP等相关技术的研究,提出了SSH架构中方法级依赖缓存的解决方案:使用EhCache结合Concur-rentHashMap实现缓存的细粒度化,使用Annotation存储依赖信息,通过AOP实现缓存服务代码与业务方法的分离。这种方案解决了实际应用中不能合理刷新数据、细粒度化较难等问题。实践表明,这种方案具有容易实现、便于维护和扩展、使用方便等特点。

关 键 词:依赖缓存  EhCache  ConcurrentHashMap  Annotation  AOP

The Solution of Method-Level Cache Dependency in the SSH Architecture
YANG Shu-lin,HU Jie-ping. The Solution of Method-Level Cache Dependency in the SSH Architecture[J]. Journal of Beijing Institute of Graphic Communication, 2012, 20(2): 48-50,54
Authors:YANG Shu-lin  HU Jie-ping
Affiliation:(Beijing Institute of Graphic Communication,Beijing 102600,China)
Abstract:Caching is one of the important means to improve system performance.Realizing cache dependency is to establish an effective association between dependency object and cache object,in order to refresh the data reasonably.Through the research of EhCache,Map,Annotation,AOP and other related technology,this paper proposes one solution of method-level cache-dependency in the SSH Architecture,which uses EhCache and ConcurrentHashMap to implement the fine-grained cache,and the Annotation storage dependent information,through AOP to implement separation of caching service code and business methods.Solving some problems in practical application,for example,it is to refresh the unreasonably,which is more difficult to achieve fine-grained.Practice shows that this solution has easy to implement,maintain and extend,and easy to use and so on.
Keywords:cache dependency  EhCache  ConcurrentHash Map  Annotation  AOP
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号