O'Reilly logo

Spring Data by Petri Kainulainen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Spring cache abstraction with Spring Data Redis

The cache abstraction of Spring Framework 3.1 applies caching to Java methods. When a cached method is called, the cache abstraction will check from the cache if the method has been called earlier by using the same parameters. If this is the case, then the return value is fetched from the cache and the method is not executed. Otherwise, the method is executed and its return value is stored in the cache.

Note

The cache abstraction of Spring Framework 3.1 is explained in more detail at http://static.springsource.org/spring/docs/3.1.x/spring-framework-reference/html/cache.html.

Spring Data Redis provides an implementation of the Spring cache abstraction. Using Redis as a cache has two benefits over ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required