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 Improvements with @Cacheable
A hands-on guide covering how Spring Cache Abstraction works, how to use @Cacheable, @CacheEvict, and @CachePut, switching to Caffeine and Redis, and measuring hit rates with Micrometer, all with practical code examples. Aimed at beginner-to-intermediate developers who want to fix response latency caused by redundant DB or external API calls with just a few lines of annotations.