The Spring Cache Abstraction: @Cacheable, @CacheEvict, Key Generators and the Self-Invocation Trap
A beginner-first walk through Spring's application-level caching on Spring Boot 4.1.1: what the interceptor actually does, what SimpleKeyGenerator puts in the map, and the four traps that account for most caching bugs — self-invocation, key collisions, eviction timing, and declarations that only fail at the first call. Every figure comes out of a companion project whose 20 tests produce the transcripts. Includes two corrections: @EnableCaching has no exposeProxy attribute, and the documented cache-provider detection order does not match the enum that ships.