spring-boot-cache

Installation
Summary

Annotation-driven caching abstraction for Spring Boot service methods with multi-provider support.

  • Supports multiple cache providers (ConcurrentMap, Caffeine, Redis, Ehcache, JCache) via pluggable CacheManager beans without changing business code
  • Provides @Cacheable, @CachePut, @CacheEvict, and @Caching annotations with SpEL-based key generation, conditional caching, and synchronization control
  • Includes configuration patterns for TTL, capacity limits, and scheduled eviction; integrates with Spring Actuator for cache hit/miss metrics
  • Covers cache key strategies, multi-level consistency, reactive type caching, and best practices for testing and production observability
SKILL.md

Spring Boot Cache Abstraction

Overview

6-step workflow for enabling cache abstraction, configuring providers (Caffeine, Redis, Ehcache), annotating service methods, and validating behavior in Spring Boot 3.5+ applications. Apply @Cacheable for reads, @CachePut for writes, @CacheEvict for deletions. Configure TTL/eviction policies and expose metrics via Actuator.

When to Use

  • Add @Cacheable, @CachePut, or @CacheEvict to service methods.
  • Configure Caffeine, Redis, or Ehcache with TTL and capacity policies.
  • Implement eviction strategies for stale data.
  • Diagnose cache misses or invalidation issues.
  • Expose hit/miss metrics via Actuator or Micrometer.

Instructions

Related skills

More from giuseppe-trisciuoglio/developer-kit

Installs
913
GitHub Stars
246
First Seen
Feb 3, 2026