hybridcache-deep-dive
HybridCache Deep Dive
Vahid Arya 8/20/2025 0 44

HybridCache in .NET is a caching mechanism introduced in .NET 9 that combines the benefits of both in-memory caching and distributed caching.It aims to provide a unified and efficient caching solution forASP.NETCore applications and other .NET projects.

mastering-pattern-matching-in-c-with-real-examples
Mastering Pattern Matching in C# – With Real Examples
Vahid Arya 8/20/2025 0 31

Pattern matching is a technique where you test an expression to determine if it has certain characteristics. 
C# pattern matching provides more concise syntax for testing expressions and taking action when an expression matches. 
The "is" supports pattern matching to test an expression and conditionally declare a new variable to the result of that expression. 
The "switch" enables you to perform actions based on the first matching pattern for an expression. 
These two expressions support a rich vocabulary of patterns.

boost-your-net-core-web-api-performance-with-response-compression-gzip-brotli
Boost Your .NET Core Web API Performance with Response Compression (Gzip & Brotli)
Vahid Arya 8/16/2025 0 38

Response compression reduces the size of data sent from your API to clients, resulting in faster load times and lower bandwidth usage. By compressing responses, you improve overall application performance and create a better experience for users, especially over slower networks.

rate-limiting-middleware-in-aspnet-core
Rate limiting middleware in ASP.NET Core
Vahid Arya 8/15/2025 0 74

The Microsoft.AspNetCore.RateLimiting middleware provides rate limiting middleware. Apps configure rate limiting policies and then attach the policies to endpoints.

Why use rate limiting
Rate limiting can be used for managing the flow of incoming requests to an app. Key reasons to implement rate limiting:

  • Preventing Abuse: Rate limiting helps protect an app from abuse by limiting the number of requests a user or client can make in a given time period. This is particularly important for public APIs.
  • Ensuring Fair Usage: By setting limits, all users have fair access to resources, preventing users from monopolizing the system.
  • Protecting Resources: Rate limiting helps prevent server overload by controlling the number of requests that can be processed, thus protecting the backend resources from being overwhelmed.
  • Enhancing Security: It can mitigate the risk of Denial of Service (DoS) attacks by limiting the rate at which requests are processed, making it harder for attackers to flood a system.
  • Improving Performance: By controlling the rate of incoming requests, optimal performance and responsiveness of an app can be maintained, ensuring a better user experience.
  • Cost Management: For services that incur costs based on usage, rate limiting can help manage and predict expenses by controlling the volume of requests processed.
How to Configure Redis or Memcached as IDistributedCache in ASP.NET Core
Redis or Memcached or Sql Server as IDistributedCache in .NET
Vahid Arya 8/7/2025 0 50

Memcached is a distributed, high-speed caching system that stores simple key-value pairs in memory. It’s ideal for quick, transient data storage without persistence or complex features.

Redis is a distributed, open-source, in-memory data store used as a cache, database, and message broker. It supports advanced data structures and features like persistence, replication, and clustering.

Yes, you can configure IDistributedCache in .NET to use either Redis or Memcached as the backend cache provider. This allows you to use the distributed caching infrastructure of .NET while leveraging the power of Redis or Memcached to store the data.

1 2 3
Stay in touch with us.

(+98)9192962583

info@redmask.ir

paint-brush
Follow Me

© vahid arya. All Rights Reserved.