SlideShare une entreprise Scribd logo
1  sur  28
Télécharger pour lire hors ligne
Caching patterns
for lazy devs
for lazy loading
Luigi Fugaro
Solution Architect @Redis
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
❖ Caching is everywhere
❖ Software Architecture
❖ Caching Patterns
❖ Demo
❖ Q&A
Agenda
#VOXXEDTICINO 3
Caching is everywhere
4
#VOXXEDTICINO 5
Caching is everywhere
❖ The first time I heard about cache,
it was about browser cache with
Netscape Navigator.
#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
#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
#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
#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
10
Software Architecture
https://www.microservices.com/reference-architecture/
#VOXXEDTICINO 11
Software Architecture
https://martinfowler.com/articles/microservices/images/sketch.png
#VOXXEDTICINO 12
Software Architecture
https://martinfowler.com/articles/microservices/images/sketch.png
Colocated cache
#VOXXEDTICINO 13
Synching with source
Synching with source
Synching with source
Software Architecture
Colocated cache
Distributed cache
#VOXXEDTICINO 14
Synching with source
Software Architecture
15
Caching Patterns
#VOXXEDTICINO 16
Caching Patterns
❖ Cache-aside (Lazy-loading)
❖ Read-Through
❖ Write-Through
❖ Write-Behind (Write-Back)
❖ Refresh-Ahead
❖ Read-Replica
#VOXXEDTICINO 17
Caching Patterns
❖ Cache-aside (Lazy-loading)
❖ Read-Through
❖ Write-Through
❖ Write-Behind (Write-Back)
❖ Refresh-Ahead
❖ Read-Replica
#VOXXEDTICINO 18
Caching Patterns
❖ Cache-aside (Lazy-loading)
❖ Read-Through
❖ Write-Through
❖ Write-Behind (Write-Back)
❖ Refresh-Ahead
❖ Read-Replica
@Service
@CacheConfig(cacheNames={"person"})
public class PersonService {
private final PersonRepository repository;
public PersonService(PersonRepository repository) {
this.repository = repository;
}
@Cacheable(unless="#result == null")
public Optional<Person> findById(Long id) {
return repository.findById(id);
}
@Cacheable(unless="#result == null")
public List<Person> findAll() {
return repository.findAll();
}
@CachePut(key = "#result.id", unless = "#result == null")
public Person save(Person Person) {
return repository.save(Person);
}
@CacheEvict
public void deleteById(Long id) {
repository.deleteById(id);
}
@CacheEvict
public void deleteAll() {
repository.deleteAll();
}
}
#VOXXEDTICINO 19
Caching Patterns
❖ Cache-aside (Lazy-loading)
❖ Read-Through
❖ Write-Through
❖ Write-Behind (Write-Back)
❖ Refresh-Ahead
❖ Read-Replica
#VOXXEDTICINO 20
Caching Patterns
❖ Cache-aside (Lazy-loading)
❖ Read-Through
❖ Write-Through
❖ Write-Behind (Write-Back)
❖ Refresh-Ahead
❖ Read-Replica
#VOXXEDTICINO 21
Caching Patterns
❖ Cache-aside (Lazy-loading)
❖ Read-Through
❖ Write-Through
❖ Write-Behind (Write-Back)
❖ Refresh-Ahead
❖ Read-Replica
#VOXXEDTICINO 22
Caching Patterns
❖ Cache-aside (Lazy-loading)
❖ Read-Through
❖ Write-Through
❖ Write-Behind (Write-Back)
❖ Refresh-Ahead
❖ Read-Replica
#VOXXEDTICINO 23
Caching Patterns
❖ Cache-aside (Lazy-loading)
❖ Read-Through
❖ Write-Through
❖ Write-Behind (Write-Back)
❖ Refresh-Ahead
❖ Read-Replica
24
Demo
#VOXXEDTICINO 25
Demo
★ Cache Provider
redisGears
Implementation details…
❏ Serverless Engine
Q&A
#VOXXEDTICINO 27
Redis Enterprise Real-Time Data Platform
Hashes
Bitmaps
Strings
Bit field
Streams
Hyperloglog
Sorted Sets
Sets
Geospatial
Redis Core Redis Modules
Lists
Linear Scalability HA Geo-Distribution
Durability Backup & Restore Tiered-Memory Access Security
Multi-Tenant
Data Structures
BloomFilter
Search
Graph
TimeSeries
AI
JSON
Gears
Grazie!
l.fugaro@gmail.com
@foogaro
@foogaro
https:/
/www.linkedin.com/in/luigifugaro/

Contenu connexe

Similaire à Caching Patterns for lazy devs for lazy loading - Luigi Fugaro VDTJAN23

Similaire à Caching Patterns for lazy devs for lazy loading - Luigi Fugaro VDTJAN23 (20)

AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdfAstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
 
DockerCon EU 2015: Day 1 General Session
DockerCon EU 2015: Day 1 General SessionDockerCon EU 2015: Day 1 General Session
DockerCon EU 2015: Day 1 General Session
 
Docker - Der Wal in der Kiste
Docker - Der Wal in der KisteDocker - Der Wal in der Kiste
Docker - Der Wal in der Kiste
 
Html5 workshop part 1
Html5 workshop part 1Html5 workshop part 1
Html5 workshop part 1
 
Cloud-Native .Net des applications containerisées .Net sur Linux, Windows e...
 Cloud-Native .Net des applications containerisées .Net sur Linux, Windows e... Cloud-Native .Net des applications containerisées .Net sur Linux, Windows e...
Cloud-Native .Net des applications containerisées .Net sur Linux, Windows e...
 
Web summit.pptx
Web summit.pptxWeb summit.pptx
Web summit.pptx
 
Apache Flex and the imperfect Web
Apache Flex and the imperfect WebApache Flex and the imperfect Web
Apache Flex and the imperfect Web
 
Docker in development (Story)
Docker in development (Story)Docker in development (Story)
Docker in development (Story)
 
DevCon5 (July 2014) - Acision SDK
DevCon5 (July 2014) - Acision SDKDevCon5 (July 2014) - Acision SDK
DevCon5 (July 2014) - Acision SDK
 
ITKonekt 2023: The Busy Platform Engineers Guide to API Gateways
ITKonekt 2023: The Busy Platform Engineers Guide to API GatewaysITKonekt 2023: The Busy Platform Engineers Guide to API Gateways
ITKonekt 2023: The Busy Platform Engineers Guide to API Gateways
 
susanta_resume
susanta_resumesusanta_resume
susanta_resume
 
resume
resumeresume
resume
 
TechDayConf Edition 1 - 2020
TechDayConf Edition 1 -  2020TechDayConf Edition 1 -  2020
TechDayConf Edition 1 - 2020
 
VUC 24-May-2013 - Crocodile
VUC 24-May-2013 - CrocodileVUC 24-May-2013 - Crocodile
VUC 24-May-2013 - Crocodile
 
Front End Development | Introduction
Front End Development | IntroductionFront End Development | Introduction
Front End Development | Introduction
 
Dmeeker Finala
Dmeeker FinalaDmeeker Finala
Dmeeker Finala
 
Bahrain ch9 introduction to docker 5th birthday
Bahrain ch9 introduction to docker 5th birthday Bahrain ch9 introduction to docker 5th birthday
Bahrain ch9 introduction to docker 5th birthday
 
Ask Us Anything: Dries Buytaert and Team Tell All on Drupal 8
Ask Us Anything: Dries Buytaert and Team Tell All on Drupal 8Ask Us Anything: Dries Buytaert and Team Tell All on Drupal 8
Ask Us Anything: Dries Buytaert and Team Tell All on Drupal 8
 
Html5
Html5Html5
Html5
 
soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5
 

Plus de Luigi Fugaro

Plus de Luigi Fugaro (10)

Ottimizzare le performance dell'API Server K8s come utilizzare cache e eventi...
Ottimizzare le performance dell'API Server K8s come utilizzare cache e eventi...Ottimizzare le performance dell'API Server K8s come utilizzare cache e eventi...
Ottimizzare le performance dell'API Server K8s come utilizzare cache e eventi...
 
Sharp Coding 2023 - Luigi Fugaro - ACRE.pdf
Sharp Coding 2023 - Luigi Fugaro - ACRE.pdfSharp Coding 2023 - Luigi Fugaro - ACRE.pdf
Sharp Coding 2023 - Luigi Fugaro - ACRE.pdf
 
Red Hat Summit Connect 2023 - Redis Enterprise, the engine of Generative AI
Red Hat Summit Connect 2023 - Redis Enterprise, the engine of Generative AIRed Hat Summit Connect 2023 - Redis Enterprise, the engine of Generative AI
Red Hat Summit Connect 2023 - Redis Enterprise, the engine of Generative AI
 
Unleashing the Power of Vector Search in .NET - DotNETConf2024.pdf
Unleashing the Power of Vector Search in .NET - DotNETConf2024.pdfUnleashing the Power of Vector Search in .NET - DotNETConf2024.pdf
Unleashing the Power of Vector Search in .NET - DotNETConf2024.pdf
 
Unleashing the Power of Vector Search in .NET - SharpCoding2024.pdf
Unleashing the Power of Vector Search in .NET - SharpCoding2024.pdfUnleashing the Power of Vector Search in .NET - SharpCoding2024.pdf
Unleashing the Power of Vector Search in .NET - SharpCoding2024.pdf
 
Codemotion Milan '22 - Real Time Data - No CRDTs, no party!
Codemotion Milan '22 - Real Time Data - No CRDTs, no party!Codemotion Milan '22 - Real Time Data - No CRDTs, no party!
Codemotion Milan '22 - Real Time Data - No CRDTs, no party!
 
OpenSlava 2018 - Cloud Native Applications with OpenShift
OpenSlava 2018 - Cloud Native Applications with OpenShiftOpenSlava 2018 - Cloud Native Applications with OpenShift
OpenSlava 2018 - Cloud Native Applications with OpenShift
 
Redis - Non solo cache
Redis - Non solo cacheRedis - Non solo cache
Redis - Non solo cache
 
JDV for Codemotion Rome 2017
JDV for Codemotion Rome 2017JDV for Codemotion Rome 2017
JDV for Codemotion Rome 2017
 
2.5tier Javaday (italian)
2.5tier Javaday (italian)2.5tier Javaday (italian)
2.5tier Javaday (italian)
 

Dernier

如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
acoha1
 
如何办理英国卡迪夫大学毕业证(Cardiff毕业证书)成绩单留信学历认证
如何办理英国卡迪夫大学毕业证(Cardiff毕业证书)成绩单留信学历认证如何办理英国卡迪夫大学毕业证(Cardiff毕业证书)成绩单留信学历认证
如何办理英国卡迪夫大学毕业证(Cardiff毕业证书)成绩单留信学历认证
ju0dztxtn
 
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
yulianti213969
 
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
pwgnohujw
 
edited gordis ebook sixth edition david d.pdf
edited gordis ebook sixth edition david d.pdfedited gordis ebook sixth edition david d.pdf
edited gordis ebook sixth edition david d.pdf
great91
 
Displacement, Velocity, Acceleration, and Second Derivatives
Displacement, Velocity, Acceleration, and Second DerivativesDisplacement, Velocity, Acceleration, and Second Derivatives
Displacement, Velocity, Acceleration, and Second Derivatives
23050636
 
Data Analytics for Digital Marketing Lecture for Advanced Digital & Social Me...
Data Analytics for Digital Marketing Lecture for Advanced Digital & Social Me...Data Analytics for Digital Marketing Lecture for Advanced Digital & Social Me...
Data Analytics for Digital Marketing Lecture for Advanced Digital & Social Me...
Valters Lauzums
 
如何办理加州大学伯克利分校毕业证(UCB毕业证)成绩单留信学历认证
如何办理加州大学伯克利分校毕业证(UCB毕业证)成绩单留信学历认证如何办理加州大学伯克利分校毕业证(UCB毕业证)成绩单留信学历认证
如何办理加州大学伯克利分校毕业证(UCB毕业证)成绩单留信学历认证
a8om7o51
 
如何办理哥伦比亚大学毕业证(Columbia毕业证)成绩单原版一比一
如何办理哥伦比亚大学毕业证(Columbia毕业证)成绩单原版一比一如何办理哥伦比亚大学毕业证(Columbia毕业证)成绩单原版一比一
如何办理哥伦比亚大学毕业证(Columbia毕业证)成绩单原版一比一
fztigerwe
 
1:1原版定制利物浦大学毕业证(Liverpool毕业证)成绩单学位证书留信学历认证
1:1原版定制利物浦大学毕业证(Liverpool毕业证)成绩单学位证书留信学历认证1:1原版定制利物浦大学毕业证(Liverpool毕业证)成绩单学位证书留信学历认证
1:1原版定制利物浦大学毕业证(Liverpool毕业证)成绩单学位证书留信学历认证
ppy8zfkfm
 
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
jk0tkvfv
 

Dernier (20)

如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
 
Northern New England Tableau User Group (TUG) May 2024
Northern New England Tableau User Group (TUG) May 2024Northern New England Tableau User Group (TUG) May 2024
Northern New England Tableau User Group (TUG) May 2024
 
社内勉強会資料_Object Recognition as Next Token Prediction
社内勉強会資料_Object Recognition as Next Token Prediction社内勉強会資料_Object Recognition as Next Token Prediction
社内勉強会資料_Object Recognition as Next Token Prediction
 
如何办理英国卡迪夫大学毕业证(Cardiff毕业证书)成绩单留信学历认证
如何办理英国卡迪夫大学毕业证(Cardiff毕业证书)成绩单留信学历认证如何办理英国卡迪夫大学毕业证(Cardiff毕业证书)成绩单留信学历认证
如何办理英国卡迪夫大学毕业证(Cardiff毕业证书)成绩单留信学历认证
 
Credit Card Fraud Detection: Safeguarding Transactions in the Digital Age
Credit Card Fraud Detection: Safeguarding Transactions in the Digital AgeCredit Card Fraud Detection: Safeguarding Transactions in the Digital Age
Credit Card Fraud Detection: Safeguarding Transactions in the Digital Age
 
NOAM AAUG Adobe Summit 2024: Summit Slam Dunks
NOAM AAUG Adobe Summit 2024: Summit Slam DunksNOAM AAUG Adobe Summit 2024: Summit Slam Dunks
NOAM AAUG Adobe Summit 2024: Summit Slam Dunks
 
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
 
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
 
edited gordis ebook sixth edition david d.pdf
edited gordis ebook sixth edition david d.pdfedited gordis ebook sixth edition david d.pdf
edited gordis ebook sixth edition david d.pdf
 
Data Analysis Project Presentation : NYC Shooting Cluster Analysis
Data Analysis Project Presentation : NYC Shooting Cluster AnalysisData Analysis Project Presentation : NYC Shooting Cluster Analysis
Data Analysis Project Presentation : NYC Shooting Cluster Analysis
 
MATERI MANAJEMEN OF PENYAKIT TETANUS.ppt
MATERI  MANAJEMEN OF PENYAKIT TETANUS.pptMATERI  MANAJEMEN OF PENYAKIT TETANUS.ppt
MATERI MANAJEMEN OF PENYAKIT TETANUS.ppt
 
The Significance of Transliteration Enhancing
The Significance of Transliteration EnhancingThe Significance of Transliteration Enhancing
The Significance of Transliteration Enhancing
 
Displacement, Velocity, Acceleration, and Second Derivatives
Displacement, Velocity, Acceleration, and Second DerivativesDisplacement, Velocity, Acceleration, and Second Derivatives
Displacement, Velocity, Acceleration, and Second Derivatives
 
Data Analytics for Digital Marketing Lecture for Advanced Digital & Social Me...
Data Analytics for Digital Marketing Lecture for Advanced Digital & Social Me...Data Analytics for Digital Marketing Lecture for Advanced Digital & Social Me...
Data Analytics for Digital Marketing Lecture for Advanced Digital & Social Me...
 
如何办理加州大学伯克利分校毕业证(UCB毕业证)成绩单留信学历认证
如何办理加州大学伯克利分校毕业证(UCB毕业证)成绩单留信学历认证如何办理加州大学伯克利分校毕业证(UCB毕业证)成绩单留信学历认证
如何办理加州大学伯克利分校毕业证(UCB毕业证)成绩单留信学历认证
 
Sensing the Future: Anomaly Detection and Event Prediction in Sensor Networks
Sensing the Future: Anomaly Detection and Event Prediction in Sensor NetworksSensing the Future: Anomaly Detection and Event Prediction in Sensor Networks
Sensing the Future: Anomaly Detection and Event Prediction in Sensor Networks
 
Aggregations - The Elasticsearch "GROUP BY"
Aggregations - The Elasticsearch "GROUP BY"Aggregations - The Elasticsearch "GROUP BY"
Aggregations - The Elasticsearch "GROUP BY"
 
如何办理哥伦比亚大学毕业证(Columbia毕业证)成绩单原版一比一
如何办理哥伦比亚大学毕业证(Columbia毕业证)成绩单原版一比一如何办理哥伦比亚大学毕业证(Columbia毕业证)成绩单原版一比一
如何办理哥伦比亚大学毕业证(Columbia毕业证)成绩单原版一比一
 
1:1原版定制利物浦大学毕业证(Liverpool毕业证)成绩单学位证书留信学历认证
1:1原版定制利物浦大学毕业证(Liverpool毕业证)成绩单学位证书留信学历认证1:1原版定制利物浦大学毕业证(Liverpool毕业证)成绩单学位证书留信学历认证
1:1原版定制利物浦大学毕业证(Liverpool毕业证)成绩单学位证书留信学历认证
 
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
 

Caching Patterns for lazy devs for lazy loading - Luigi Fugaro VDTJAN23

  • 1. Caching patterns for lazy devs for lazy loading Luigi Fugaro Solution Architect @Redis
  • 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
  • 3. ❖ Caching is everywhere ❖ Software Architecture ❖ Caching Patterns ❖ Demo ❖ Q&A Agenda #VOXXEDTICINO 3
  • 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
  • 13. Colocated cache #VOXXEDTICINO 13 Synching with source Synching with source Synching with source Software Architecture
  • 14. Colocated cache Distributed cache #VOXXEDTICINO 14 Synching with source Software Architecture
  • 16. #VOXXEDTICINO 16 Caching Patterns ❖ Cache-aside (Lazy-loading) ❖ Read-Through ❖ Write-Through ❖ Write-Behind (Write-Back) ❖ Refresh-Ahead ❖ Read-Replica
  • 17. #VOXXEDTICINO 17 Caching Patterns ❖ Cache-aside (Lazy-loading) ❖ Read-Through ❖ Write-Through ❖ Write-Behind (Write-Back) ❖ Refresh-Ahead ❖ Read-Replica
  • 18. #VOXXEDTICINO 18 Caching Patterns ❖ Cache-aside (Lazy-loading) ❖ Read-Through ❖ Write-Through ❖ Write-Behind (Write-Back) ❖ Refresh-Ahead ❖ Read-Replica @Service @CacheConfig(cacheNames={"person"}) public class PersonService { private final PersonRepository repository; public PersonService(PersonRepository repository) { this.repository = repository; } @Cacheable(unless="#result == null") public Optional<Person> findById(Long id) { return repository.findById(id); } @Cacheable(unless="#result == null") public List<Person> findAll() { return repository.findAll(); } @CachePut(key = "#result.id", unless = "#result == null") public Person save(Person Person) { return repository.save(Person); } @CacheEvict public void deleteById(Long id) { repository.deleteById(id); } @CacheEvict public void deleteAll() { repository.deleteAll(); } }
  • 19. #VOXXEDTICINO 19 Caching Patterns ❖ Cache-aside (Lazy-loading) ❖ Read-Through ❖ Write-Through ❖ Write-Behind (Write-Back) ❖ Refresh-Ahead ❖ Read-Replica
  • 20. #VOXXEDTICINO 20 Caching Patterns ❖ Cache-aside (Lazy-loading) ❖ Read-Through ❖ Write-Through ❖ Write-Behind (Write-Back) ❖ Refresh-Ahead ❖ Read-Replica
  • 21. #VOXXEDTICINO 21 Caching Patterns ❖ Cache-aside (Lazy-loading) ❖ Read-Through ❖ Write-Through ❖ Write-Behind (Write-Back) ❖ Refresh-Ahead ❖ Read-Replica
  • 22. #VOXXEDTICINO 22 Caching Patterns ❖ Cache-aside (Lazy-loading) ❖ Read-Through ❖ Write-Through ❖ Write-Behind (Write-Back) ❖ Refresh-Ahead ❖ Read-Replica
  • 23. #VOXXEDTICINO 23 Caching Patterns ❖ Cache-aside (Lazy-loading) ❖ Read-Through ❖ Write-Through ❖ Write-Behind (Write-Back) ❖ Refresh-Ahead ❖ Read-Replica
  • 25. #VOXXEDTICINO 25 Demo ★ Cache Provider redisGears Implementation details… ❏ Serverless Engine
  • 26. Q&A
  • 27. #VOXXEDTICINO 27 Redis Enterprise Real-Time Data Platform Hashes Bitmaps Strings Bit field Streams Hyperloglog Sorted Sets Sets Geospatial Redis Core Redis Modules Lists Linear Scalability HA Geo-Distribution Durability Backup & Restore Tiered-Memory Access Security Multi-Tenant Data Structures BloomFilter Search Graph TimeSeries AI JSON Gears