Skip to content
Ben Manes edited this page Mar 24, 2015 · 30 revisions

JSR-107 JCache is a standardized caching API that is Java 6 compatible and introduced in JEE 8. The intent of this JSR was to ease adoption of commercial distributed caching products and therefore makes many design decisions that are beneficial for vendors but poorly thought out for users.

We do not recommend or encourage adopting JCache due to its badly designed API, commercial focus, and low quality test compatibility kit. The proposed v1.1 update is interface incompatible with v1.0 in order to provide vendor-specific features by the specification lead's employer.

By request, Caffeine provides a local in-memory implementation. The JCache provider is configured using Typesafe's Config library. See the reference.conf for more details.

Annotation support

Spring

See the Spring documentation.

Guice

The JSR provides an integration module that delegates to the default JCache provider.

compile 'org.jsr107.ri:cache-annotations-ri-guice:1.0.0'
Injector injector = Guice.createInjector(new CacheAnnotationsModule());

CDI

The JSR provides an extension that delegates to the default JCache provider.

compile 'org.jsr107.ri:cache-annotations-ri-cdi:1.0.0'
Clone this wiki locally