• Thu. Oct 24th, 2024

How to use HybridCache in ASP.NET Core

Byadmin

Jul 18, 2024



The key benefits of HybridCache are greater simplicity, improved performance, and enhanced efficiency.

HybridCache is an abstract class pertaining to the Microsoft.Extensions.Caching.Hybrid namespace. To store data to the cache and retrieve data from the cache, you use the GetOrCreateAsync method of the HybridCache class. This method takes advantage of the cache key to retrieve an object from the primary cache.

Now, if the object requested by the application is not available in the cache, i.e., in the case of a cache miss, the method checks the secondary cache if it is configured. If the data is not available there, the method stores the object in both the primary and secondary caches.



Source link