Spring @Cacheable and Redis
Free Spring Boot module: @Cacheable keys, self-invocation, eviction, and Redis TTL. First topics open in the browser — no sign-up.
Free Spring Boot module on @Cacheable, cache keys, eviction, and Redis. First topics open with no account.
Self-invocation bypasses @Cacheable the same way it bypasses @Transactional. Wrong keys, caching nulls, and missing TTL are the production failures. This guest module is the caching track with the first topics unlocked.
Use it after Java collections (the map is the cache) and before you trust Redis in production. The labs stay separate: this is the Spring cache API, not a debug incident.
What you will cover
- @Cacheable proxy rules and self-invocation
- Cache keys, unless, and condition
- @CacheEvict and stale entries
- Redis TTL and null-value caching
- First topics free in the browser
Related free labs and modules
Common questions
Why is Spring @Cacheable not caching?
The usual cause is calling this.getPrice() inside the same class, which skips the AOP proxy. Other causes are a missing CacheManager, a wrong key, or unless/condition excluding the result.
Is the Spring caching module free?
The first topics are free without an account. Sign in to open the rest of the Spring cache track, including Redis eviction patterns.
Should I cache nulls in Redis?
Caching misses can prevent stampedes, but unbounded nulls with no TTL become their own leak. The module covers when unless and TTL belong in the annotation.
Free Spring Boot debug challenges · Free debug challenges · Java Spring Boot path · Create free account