Caching Articles
Articles covering caching strategies and implementation patterns using Spring Cache, Caffeine, and Redis.
-
How to Use Redis with Spring Boot - Implementation Patterns for Session Management, Caching, and Pub/Sub
Learn how to solve common issues such as sessions not being shared across multiple instances and switching the backend of @Cacheable using Redis. This article covers connection configuration for spring-boot-starter-data-redis, session externalization with Spring Session, RedisCacheManager, and Pub/Sub implementation, with code examples for each use case.
-
How to Use Spring Boot Caching - Easy Performance Improvement with @Cacheable
A practical guide covering Spring Cache Abstraction mechanics, how to use @Cacheable, @CacheEvict, and @CachePut, switching between Caffeine and Redis, and measuring hit rates with Micrometer, all with hands-on code. For beginner to intermediate developers who want to improve response latency from duplicate DB or external API calls with just a few annotations.