Caffeine

1 post in this section

Spring Boot Caching: Multi-Level Cache with Caffeine + Redis

Caching reduces database load and response latency. Spring Boot’s cache abstraction lets you add caching with annotations, then swap the implementation (Caffeine, Redis, multi-level) without changing your business code. This guide covers Caffeine for in-JVM caching, Redis for distributed caching, and a multi-level cache that combines both. Spring Cache Abstraction Spring’s cache abstraction uses three annotations: Annotation Behaviour @Cacheable Cache the return value. On subsequent calls, return from cache without executing the method.

Continue reading »