Caching in ASP.NET C# - Memory Caching is AMAZING

preview_player
Показать описание
🔥 Want to 50x your application's performance? Then you NEED to learn about Memory Caching in ASP.NET and C#!

📚 Or do you like to learn through BOOKS more? Our TINY C# PROJECTS BOOK!

We'll make sure to turn you into a true developer in no time!

TIMESTAMPS
00:00 Intro
00:16 Our database and results of caching
02:04 This one is for you!
02:38 Let´s talk about caching
06:56 What are our cache options?
10:09 Testing our application with and without caching
11:54 Thanks for watching!

Caching in ASP.NET C# - Memory Caching is AMAZING

So, what is C#?
C# (pronounced "See Sharp") is a modern, object-oriented, and type-safe programming language. C# enables developers to build many types of secure and robust applications that run in .NET. C# has its roots in the C family of languages and will be immediately familiar to C, C++, Java, and JavaScript programmers. This tour provides an overview of the major components of the language in C# 8 and earlier. If you want to explore the language through interactive examples, try the introduction to C# tutorials.

And ASP?
ASP.NET is an open-source, server-side web-application framework designed for web development to produce dynamic web pages. It was developed by Microsoft to allow programmers to build dynamic web sites, applications and services. The name stands for Active Server Pages Network Enabled Technologies

And what is Memory caching?
Caching can significantly improve the performance and scalability of an app by reducing the work required to generate content. Caching works best with data that changes infrequently and is expensive to generate. Caching makes a copy of data that can be returned much faster than from the source. Apps should be written and tested to never depend on cached data.

ASP.NET Core supports several different caches. The simplest cache is based on the IMemoryCache. IMemoryCache represents a cache stored in the memory of the web server. Apps running on a server farm (multiple servers) should ensure sessions are sticky when using the in-memory cache. Sticky sessions ensure that requests from a client all go to the same server. For example, Azure Web apps use Application Request Routing (ARR) to route all requests to the same server.

Non-sticky sessions in a web farm require a distributed cache to avoid cache consistency problems. For some apps, a distributed cache can support higher scale-out than an in-memory cache. Using a distributed cache offloads the cache memory to an external process.

The in-memory cache can store any object. The distributed cache interface is limited to byte[]. The in-memory and distributed cache store cache items as key-value pairs.

To learn more, make sure to watch the video, and we promise you that you'll become a better developer by the end of the video! Have fun!

#csharp #coding #tutorial #learn #microsoft #net #memory #caching #performance #aspnet

TAGS

TutorialsEU offers you free video tutorials about programming and development for complete beginners up to experienced programmers.
This includes C#, Unity, Python, Android, Kotlin, Machine Learning, etc.

Рекомендации по теме
Комментарии
Автор

Most of people don't go deep to talk some basics.
You are true gem :)

AliRaza-zyzk
Автор

one of the best teacher i have ever seen thx so much for the content

adnanmowakeh
Автор

I like your videos. They are very informative. Please do a video on creating a lock.

cleitoncarlospereira
Автор

I like your videos. they are very informative. Please do a video on creating a lock

jacksonmwangi
Автор

Hey great video! Could you do the video about thread safe?

asadrian
Автор

very nice presentation. i have a requirement like to get all cached keys and based on that i need to remove some keys. is there is any option get all cached keys?

antomooken
Автор

dear sir, pls make a full video on calling, call forwarding, and merging through the C# code, there is no tutorial on youtube with clear cut contect

LaviSaini-otrn
Автор

I think 3600 seconds is 1 hour. But anyway, thank you this was informative and pretty detailed

stephen
Автор

I was really able to follow you in this course can your razor pages course more than 3 Udemy courses I have. I just purchased your C# Progress Academy for $69. I like your teaching style 👍

jimmybellmon
Автор

Do you have any course using React or Vue since adoption for Angular is going down.

binojdaniel
Автор

How to implement in memory caching in the service in memory caching is when you store all the customers information in the memory of the application.and instead of searching in the database, we can have the service search in the in memory cache instead.

kawtheralmubarak
Автор

why not after an update from the database is done then that's the time it will update the cache as well... instead of adding expiration.

happie
Автор

It works great in Visual Studio only! When you use on IIS and app pool has more than 1 worker process (Web Garden) this doesn't work.

VitaliyLysak
Автор

Ty. I wonder how that caching eats resources. Imagine tousands users at the same time and every second program saving into the chache and removing from it. How program handles it? Does it depends from computers capabilities? Ty

Liootas
Автор

You should create a view model and cache that instead of the db entity

slypete