Caching with Spring: Advanced Topics and Best Practices
summary
Shows how to use Spring’s caching abstraction with non-default cache providers and explains the JCache (JSR-107) specification and how it is adopted in Spring. Covers best practices for integrating local and distributed caches into enterprise applications that require strong consistency, and demonstrates techniques with live demos including a distributed cache cluster (Raspberry Pis and Lego Mindstorms) using Spring.
AI-written summary · about
chapters (17)
- 0:00Start
- 12:20Lokal In-Memory
- 15:11Clustered - with sync
- 16:07Invalidation - Option 1
- 18:14Replication
- 21:07Long GCs can destabilize your cluster
- 24:18Distributed Caches
- 45:32Example: Hazelcast putting and getting 10.000 objects locally
- 50:00Tying your code to a cache provider is bad practice
- 50:24Try switching from EHCache to Hazelcast
- 50:46You can't switch cache providers between environments
- 51:35You mess up your business logic with infrastructure
- 52:10Introducing Spring's cache abstraction
- 54:09Spring's Caching Annotations
- 56:12Default Key Generation Strategy Key
- 57:41You need a custom default Key Generator?
- 58:34SpEL in Caching Annotations
related talks
01h 31mBringing javax.cache'ing to your application
45mCaching in Applications Still Matters
43mWhere Is My Cache? Architectural Patterns for Caching ...
46mCaching Made Bootiful
44mCatch Me If You Cache: Cache Patterns and Pitfalls in Production
27mCaching for Cash
49mCaching for Agentic Java Systems: Internal, Distributed, and Semantic
44mHow to speed up your application using JCache
