ehcache 是一个非常轻量级的缓存实现,而且从1.2 之后就支持了集群,而且是hibernate 默认的缓存provider 。EhCache 是一个纯Java的进程内缓存框架,具有快速、精干等特点,是Hibernate中默认的CacheProvider。
Ehcache可以直接使用。也可以和Hibernate对象/关系框架结合使用。还可以做Servlet缓存。Cache 存储方式 :内存或磁盘。
官网地址:http://ehcache.org/
关系ehcache的详细介绍,在官网上都可以获取到。
ehache的官方的guide非常的全。不过是英文的。我把学习认为比较主要的部分翻译记录下,方便其他各位学习。由于本人英语水平有限,不会特别的准确。
官方文档位置:http://ehcache.org/files/documentation/EhcacheUserGuide.pdf
1 Preface
......................................................................................................................................
1.1 Preface
This is a book about Ehcache, a widely used open source Java cache. Ehcache has grown in size and
scope since it was introduced in October 2003. As people used it they often noticed it was missing
a feature they wanted. Over time, the features that were repeatedly asked for, and make sense for a
Cache, have been added.
这是一本关于Ehcache的书,Ehcache是一个使用很广的开源java缓存。从2003年9月Ehcache面世到至今,Ehcache的使用量和范围都成长了很多。当人们使用它的时候,经常感觉少了他们想要的特性。随着时间的过去,一些重复要求和对缓存有意义的特性都已添加到了EHCACHE中。
Ehcache is now used for Hibernate caching, data access object caching, security credential caching,
web caching, SOAP and RESTful server caching, application persistence and distributed caching.
In August 2009, Ehcache was acquired by Terracotta, Inc. and has been continously enhanced since
then.
Ehcache 现在被用来hibernate的缓存处理,数据访问对象缓存,安全证书缓存,web缓存,SOAP and RESTful 服务缓存,应用持久化和分布式缓存。在2009年八月,Ehcache被Terracotta收购,并一直在强大。
1.1.1 Version
This book is for Ehcache version 2.4.1.
这本书对Ehcache 2.4.1的版本有效
Audience
The intended audience for this book is developers who use ehcache. It should be able to be used to
start from scratch, get up and running quickly, and also be useful for the more complex options.
Ehcache is about performance and load reduction of underlying resources. Another natural audience is
performance specialists.
本书适合使用ehcache的开发人员,适合从头开始学习ehcache,对其感兴趣并且迅速的掌握它,以及想对Ehcache进行更多复杂配置的人群。
Ehache主要研究性能和降低不必要资源负载。自然另外一类读者就是性能专家。
It is also intended for application and enterprise architects. Some of the features of ehcache, such
as distributed caching and Java EE caching, are alternatives to be considered along with other ways
of solving those problems. This book discusses the trade-offs in Ehcache's approach to help make a
decision about appropriateness of use.
它也适合应用程序和企业级的架构师。Ehcache的一些特征,比如分布式缓存、J2EE缓存,也是解决这些问题的不错的方案。这本书主要讨论了如何取舍Ehcache的
特性去帮助我们做出怎么使用的决定。
1.1.3 Acknowledgements
Ehcache has had many contributions in the form of forum discussions, feature requests, bug reports,
patches and code commits.
Rather than try and list the many hundreds of people who have contributed to Ehcache in some way it
is better to link to the web site where contributions are acknowledged in the following ways:
• Bug reports and features requests appear in the changes report here:
• Patch contributors generally end up with an author tag in the source they contributed to.
• Team members appear on the team list page here:
这面就是关于对Ehcache做出贡献的感谢的词,我就不翻译了。