~/talk

Caching with Spring: Advanced Topics and Best Practices

Talkat Spring I/O 2016 · 2016-05-19..05-20· [spring, databases]
slides:none on file

Practical guidance on using Spring’s cache abstraction plus JCache (JSR‑107) with live demos: use existing providers (EHCache, Hazelcast, Infinispan, Guava), never roll your own, prefer distributed or near‑cache topologies over full replication to avoid massive network churn, watch heap sizes (32 GB JVMs and tiny 100‑entry caches both fail), and secure cached data. Shows @Cacheable/@CachePut/@CacheEvict, custom key generators, CompositeCacheManager, and a production case where disabling replication saved an overloaded system — caching configurations and TTLs remain provider‑specific.

AI-written summary · about

  1. 0:00Intro
  2. 4:47Local In-Memory
  3. 7:23Clustered - with sync
  4. 8:39Invalidation - Option 1
  5. 9:52Replication
  6. 15:10Distributed Caches
  7. 24:20Tying your code to a cache provider is bad practice
  8. 25:02Try switching from EHCache to Hazelcast
  9. 26:35You can't switch cache providers between environments
  10. 27:13You mess up your business logic with infrastructure
  11. 27:52Introducing Spring's cache abstraction
  12. 29:39Spring's Caching Annotations
  13. 33:36Default Key Generation Strategy
  14. 35:28You need a custom default Key Generator?
  15. 36:14SPEL in Caching Annotations
  16. 40:27Working with Cache Resolvers
  17. 43:44Spring vs JCache Annotations
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.