🚀 ASP.NET Core: Faster Api with Multi-Layer cache!

Опубликовано: 28 Октябрь 2024
на канале: Saeed Esmaeelinejad
1,362
68

Speaking of caching, you may already have in-memory or Distributed cache (like Redis) in your application but both approaches have some issues.

In-memory cache can't be used when you have distributed systems and multiple instances of your Api, since it's memory specific.
Distributed cache has the issue of I/O operation and network latency.

Can we merge both approaches? Yes for sure!
In this video, I've tried to show how to implement a multi-layer cache in ASP.NET Core.

Code repo[MultiLayerCache]: https://github.com/sa-es-ir/youtube-s...

Moments

00:00 - Intro
01:08 - Scenario
01:52 - Code Structure
03:55 - Cache Provider Interface
05:20 - In-Memory Cache
05:50 - Redis Cache
07:31 - Cache Manager
12:55 - API with Cache Manager

-------------------------------------------------
LinkedIn Profile:
  / sa-es-ir