Ehcache

Ehcache是一个开源的、基于标准的缓存,可提升性能、卸载数据库、简化可扩展性。 (Ehcache is an open source, standards-based cache that boosts performance, offloads your database, and simplifies scalability. )

Github stars Tracking Chart

Ehcache是一个开源的、基于标准的缓存,可提升性能、卸载数据库、简化可扩展性。 它是最广泛使用的基于Java的缓存,因为它是强大的、经过验证的、全功能的,并与其他受欢迎的库和框架集成。

Ehcache可以从进程中缓存扩展到一千万亿字节大小的高速缓存的混合进程内/进程外部署。

Checkout最近发布了Ehcache 3。它本身符合JSR107(JCache规范),支持offheap存储,并有许多其他的添加和改进。
Terracotta积极开发,维护和支持Ehcache作为Apache 2.0许可证下的专业开源项目。 欢迎贡献者加入我们的社区。

对于需要完整企业功能的应用,包括管理监控控制台(TMC),快速可重新启动的存储(FRS),安全性以及全球专业支持,请使用Terracotta BigMemory Max

Ehcache的特点(原文:http://www.ehcache.org/about/features.html

快速轻便
  • 快速
      \t
    • Ehcache的并发功能专为大型高并发系统而设计。
    • \t
    • 测试套件中的大量性能测试使Ehcache的性能在版本之间保持一致。
    • \t
    • Ehcache 3.0具有日常的自动化测试功能,因此导致降级的签到功能立即被标记。
  • 简单
      \t
    • 许多Ehcache的用户几乎不知道他们在使用它。敏感默认值不需要初始配置。
    • \t
    • API非常简单易用,可以在几分钟内启动并运行。有关详细信息,请参阅代码示例。
  • 小型化
      \t
    • Ehcache努力保持占用很小内存 —— 保持您的应用程序尽可能轻。
    • \t
    • 在Ehcache 3.0中,再次强调了这一方面 —— 取得较好的结果。
  • 最小依赖
      \t
    • 核心使用的唯一依赖是SLF4J。
可扩展
  • 提供可扩展性达到TB
      \t
    • 最大的Ehcache安装使用多TB数据存储。
    • \t
    • 而对于非堆栈存储,Ehcache已经过测试,可以在单个进程(jvm)中存储6TB数据。
  • 可扩展到数百个高速缓存
      \t
    • 最大的Ehcache安装使用数百个缓存。
  • 在大范围/多CPU服务器上进行高并发负载调整
      \t
    • 线程安全与性能之间存在张力。 Ehcache经过专门构建和测试,可以在具有数十个CPU内核的系统上进行高度并发访问。
  • 使用Terracotta服务器阵列可扩展到数百个节点
      \t
    • 通过添加Terracotta,Ehcache可以扩展到任何用例,从而在分布式部署架构上实现群集缓存。
灵活
  • 提供多种策略:
      \t
    • 到期政策
    • \t
    • 驱逐政策
    • \t
    • 存储引擎(堆,堆,磁盘)
    • \t
    • 缓存的静态/动态/运行时配置
  • 基于标准
      \t
    • 全面实施JSR107 JCACHE API
      \t
    • 多年来,Terracotta的工作人员一直参加了JSR107专家委员会。
    • \t
    • Ehcache提供迄今为止JSR107 JCache最完整的实现。实施者可以编写JCache API,这将在将来创建其他缓存解决方案的可移植性。
    • \t
    • 对于Ehcache 2.x系列,可以在github上使用符合JSR107的包装器。
    • \t
    • 对于“Native”JSR107支持查看Ehcache 3。
扩展
  • 侦听器接口
  • 装饰界面
  • 缓存加载器,缓存写入器
  • 异常处理程序
听众
  • CacheManager侦听器
      \t
    • 使用以下事件方法通过CacheManagerEventListener接口注册缓存管理器侦听器:\t
        \t\t
      • notifyCacheAdded()
      • \t\t
      • notifyCacheRemoved()
      • \t
  • 缓存事件侦听器
      \t
    • 通过CacheEventListener接口注册缓存事件侦听器,为缓存事件的后期处理提供了很大的灵活性。方法是:\t
        \t\t
      • notifyElementRemoved
      • \t\t
      • notifyElementPut
      • \t\t
      • notifyElementUpdated
      • \t\t
      • notifyElementExpired
      • \t
分布式缓存
  • Ehcache完全支持高性能分布式缓存。
  • 分布式缓存与Terracotta
      \t
    • 简单而强大的群集缓存。只需要两行配置即可。有关详细信息,请参阅分布式缓存与Terracotta。
企业Java和应用缓存
  • 通用缓存场景和模式的高质量实现。
  • 阻止缓存以避免并发操作的重复处理
  • 一个缓存,用于阻止后续线程,直到第一个读取线程填充高速缓存条目。
  • 自动缓存用于通过缓存昂贵的操作
  • SelfPopulatingCache - 一个直读缓存。缓存,在请求时填充元素,而不需要调用方知道条目的填充方式。它还可以刷新缓存条目,而不会在同一条目上阻止读取。
  • 企业Java Gzipping Servlet过滤器
      \t
    • CachingFilter - 一个抽象的,可扩展的缓存过滤器。
    • \t
    • SimplePageCachingFilter\t
        \t\t
      • 基于请求URI和查询字符串缓存页面的高性能Java servlet过滤器。它还会将页面传递到根据HTTP请求标头进行gzip压缩或解压缩的浏览器。用于缓存整个Servlet页面,无论是从JSP,速度还是任何其他渲染技术。
      • \t
    • \t
    • SimplePageFragmentCachingFilter\t
        \t\t
      • 基于请求URI和查询字符串缓存页面片段的高性能企业Java筛选器。与Servlet请求调度程序一起使用来缓存部分页面,无论是从JSP,速度还是任何其他渲染技术。可以使用JSP使用jsp:include。
      • \t
    • \t
    • 适用于Servlet 2.3和Servlet 2.4规范。
  • 可缓存命令
      \t
    • 这是一个可信赖的旧命令模式:异步行为,容错和缓存。创建一个命令,缓存它,然后尝试执行它。
  • 适用于Hibernate
      \t
    • Ehcache被普遍用作Hibernate的二级缓存。
  • 适用于Google App Engine
      \t
    • Ehcache-1.6与Google App Engine兼容。
      \t
    • 请参阅Google App Engine操作方法。
  • 通过JTA的交易支持
      \t
    • Ehcache支持JTA,是一个完全符合XA标准的资源。
开源许可
  • Apache 2.0许可证
    • Ehcache根据更新的Apache 2.0许可证发布。
    • Apache许可证也是友好的,使Ehcache可以安全,容易地在其他开源项目或商业产品中。

Overview

Name With Ownerehcache/ehcache3
Primary LanguageJava
Program languageJava (Language Count: 3)
Platform
License:Apache License 2.0
Release Count144
Last Release Namev3.10.9-internal19 (Posted on )
First Release Namev3.0.0.Alpha (Posted on 2014-12-12 10:23:32)
Created At2014-02-26 20:39:16
Pushed At2024-04-17 19:43:15
Last Commit At2024-03-22 14:38:30
Stargazers Count2k
Watchers Count153
Fork Count575
Commits Count4.9k
Has Issues Enabled
Issues Count1181
Issue Open Count86
Pull Requests Count1710
Pull Requests Open Count26
Pull Requests Close Count304
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

= The Ehcache 3.x line is currently the development line.

Status of the build:
[link="https://dev.azure.com/TerracottaCI/ehcache/_build/latest?definitionId=14"]
image::https://dev.azure.com/TerracottaCI/ehcache/_apis/build/status/ehcache3[Build Status]

For more information, you might want to go check the https://github.com/ehcache/ehcache3/wiki[wiki].

== Getting started with the new API

For samples, documentation, and usage information, please see http://ehcache.org.

== Current release

We released 3.8.1 on September 4th 2019.

The https://github.com/ehcache/ehcache3/releases/tag/v3.8.1[release notes] contain the links to the artifacts and the documentation to help you get started.

You should consider upgrading to 3.8.x as it does all previous 3.x do and more with a fully compatible API.

== Current development & next release

We released the missing features of the clustering tier of Ehcache 3 in 3.7.0.

Starting with version 3.5, Ehcache only supports Java 8 and later.

Version 3.5 is now in maintenance mode. We are no longer planning to perform release of earlier versions.

See the https://github.com/ehcache/ehcache3/milestones[milestones on GitHub] for more details on the current status.

== Contribute

With great pleasure! Have a look at our link:CONTRIBUTING.adoc[Contributing policy].

== Reporting issues

Oh no! We have no bugs! (but if we really do, see details for reporting link:CONTRIBUTING.adoc#reporting-issues[here]).

To the top