ABSTRACT:
Always running the same queries over and over... and waiting seconds after seconds, minutes after minutes.
It's not about being lazy, a dev first of all is a person with immense patience.
Patience doesn't last forever, at some point, it expires, you don't have it anymore. Exactly like data in a cache.
But the cache can be configured to retain data as long as you want. But, what about your patience? Still wanna be slow? Stressed about slowness?
Start caching your queries.
Start caching your web API call.
Start caching anything you need, just for the sake of getting it back at the speed of light.
That's the purpose of a cache. Retrieve your data instantly.
But retrieving data from the cache is just one side of the coin, what happens when you flip it?
Well, you need a mechanism to load, to feed your cache, and that's what you will discover in this presentation.
Best practices, patterns, and anti-patterns to load your cache, using Redis Stack as distributed cache and Spring Data as your Swiss army knife.
You will also learn how to distribute your cached data and get them updated automatically.
PITCH
Nowadays, retrieving data in real-time it's a must for any business application, and a caching platform is the only solution available.
Everyone knows what a cache is, but only a few know how to use it properly.
Even fewer know what a distributed cache can do.
Leveraging Spring Data and Redis Stack, I'll show how to properly implement the most common caching patterns and avoid anti-patterns.
2. More than 20 years of experience in IT.
I started my career in 1998 as a webmaster doing HTML, JavaScript,
Applets, and some graphics with Paint Shop Pro.
I then switched to Delphi, Clipper, Visual Basic, and then he finally started
working on real Java projects. I’ve been developing all kinds of web
applications, dealing with both backend and frontend frameworks.
Jumping from project to project, from company to company, in 2012 I
joined Red Hat as a consultant. An amazing experience lasted more than
7 years.
Next, I had the privilege to learn all about observability and monitoring
with Datadog working with all kind of companies.
In 2021 I received a call from Redis, a technology made in Italy, where
apps and data merge together and they enjoy it.
Luigi Fugaro
Solutions Architect
luigi.fugaro@redis.com
#VOXXEDTICINO 2
5. #VOXXEDTICINO 5
Caching is everywhere
❖ The first time I heard about cache,
it was about browser cache with
Netscape Navigator.
6. #VOXXEDTICINO 6
❖ The first time I heard about cache,
it was about browser cache with
Netscape Navigator.
❖ Second time for CPUs, L1&L2
Cache and Cache Mode
(Write-Back).
Caching is everywhere
7. #VOXXEDTICINO 7
❖ The first time I heard about cache,
it was about browser cache with
Netscape Navigator.
❖ Second time for CPUs, L1&L2 Cache
and Cache Mode (Write-Back).
❖ Third time for HTTP Server Cache
and CDN for “static-content”
(images/js/css/…).
Caching is everywhere
8. #VOXXEDTICINO 8
❖ The first time I heard about cache,
it was about browser cache with
Netscape Navigator.
❖ Second time for CPUs, L1&L2 Cache
and Cache Mode (Write-Back).
❖ Third time for HTTP Server Cache
and CDN for “static-content”
(images/js/css/…).
❖ Session management,
One-Time-Password, and so on…
Caching is everywhere
9. #VOXXEDTICINO 9
❖ The first time I heard about cache,
it was about browser cache with
Netscape Navigator.
❖ Second time for CPUs, L1&L2 Cache
and Cache Mode (Write-Back).
❖ Third time for HTTP Server Cache
and CDN for “static-content”
(images/js/css/…).
❖ Session management,
One-Time-Password, and so on…
❖ On backend, L1 Cache (session)
and L2 Cache with data access
framework such as Hibernate.
Caching is everywhere