Spring Cache Visualizer

Watch Spring's @Cacheable at work: a hit skips the database, a miss loads and stores, entries expire on TTL, and @CachePut / @CacheEvict update or clear the cache. The cache-aside pattern, made visible.

★ Star on GitHub
0
calls
0
cache hits
0
DB queries
0
DB calls saved
Caller
getUser(1)
@Cacheable proxy
check cache first
Cache "users"
key → value
Database
SELECT … (~800ms)

Cache contents

Try this: click getUser(1) → cache MISS, the DB runs (~800ms) and the result is cached. Click it again → cache HIT, instant, the DB is skipped (watch "DB calls saved" climb). @CachePut always hits the DB and refreshes the entry (new rev); @CacheEvict removes it so the next read misses again. With TTL on, wait ~7s and the entry expires — the next call reloads it.