Using HybridCache hybrid caching library

Hybrid cache can use both memory cache and distributed cache, which can improve cache hit rate and reduce access to distributed cache, thereby improving performance. When getting data from the cache, it will first get the data from the memory cache, if there is no data in the memory cache, it will get the data from the distributed cache. When writing data to the cache, it writes data to both the in-memory cache and the distributed cache. Service 1 ----> HybridCache ----> MemoryCache ----> DistributedCache https://learn.microsoft.com/zh-cn/azure/architecture/best-practices/caching ...

March 10, 2026

What is New in C# 12

Primary constructors One major feature in C# 12 is primary constructors. A primary constructor is declared on the type declaration instead of inside the class body. Its parameters can be used directly in members. Record types public record Address(string FirstName, string LastName); Class types public class Person(string firstName, string lastName) { public override string ToString() { return $"{firstName},{lastName}"; } } public Person(string firstName) : this(firstName, "hello") { } Collection expressions C# 12 adds collection expressions for concise collection initialization. // Create an array: int[] a = [1, 2, 3, 4, 5, 6, 7, 8]; // Create a list: List<string> b = ["one", "two", "three"]; // Create a span Span<char> c = ['a', 'b', 'c', 'd', 'e', 'f', 'h', 'i']; // Create a jagged 2D array: int[][] twoD = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]; // Create a jagged 2D array from variables: int[] row0 = [1, 2, 3]; int[] row1 = [4, 5, 6]; int[] row2 = [7, 8, 9]; int[][] twoDFromVariables = [row0, row1, row2]; Range and index usage sequence[0] is the first element. ^n means counting from the end. For any number n, index ^n is equivalent to sequence.Length - n. ...

March 10, 2026

Zero Framework upgraded to Aspire 9.3 version

Remove the IsAspireHost property from the Host project <IsAspireHost>true</IsAspireHost> Workload upgrade dotnet workload update Upgrade Visual Studio to the latest version Upgrade to the latest version via Visual Studio Installer. Items can be upgraded using AI GitHub Copilot App Modernization - Upgrade for .NET is a powerful Visual Studio extension that works with you to upgrade projects to newer versions of .NET, upgrade dependencies, and apply code fixes. GitHub Copilot application modernization is distributed as a Visual Studio extension and is an interactive upgrade process. ...

March 10, 2026