Skip to content

Caching & data

Redis, caching abstractions and data access without an ORM.

Data & operations
6 posts53 min reading time
Start with part 1 →
  1. Redis data types in practice — stop storing everything as a JSON stringMost .NET codebases use Redis as a big dictionary of serialized JSON. That works until you need to change one field, count something or answer "is X in Y?". A practical tour of strings, lists, sets, sorted sets and hashes with StackExchange.Redis, and when to use which.9 min read
  2. Understanding Redis timeouts — how to read a RedisTimeoutExceptionA Redis "timeout awaiting response" almost never means Redis is slow. The StackExchange.Redis timeout message contains everything you need to tell thread pool starvation, large values and an overloaded server apart, if you know how to read it.8 min read
  3. Caching abstractions — memory, Redis, hybrid, and the stampede in betweenFour caching interfaces that grew over the years, copy-pasted cache-aside code and a cache stampede waiting to happen. Why IMemoryCache and IDistributedCache aren't enough on their own, what .NET 9's HybridCache fixes, and the thin abstraction I put on top.9 min read
  4. Query providers and IDataReader — one data access API for many databasesWhen every tenant can live on a different database engine, provider-specific "if" statements spread through the whole codebase. A query provider hides connections, parameters, transactions and dialect differences behind one API, and going back to plain IDataReader can be faster than any micro-ORM.9 min read
  5. Dapper in practice — when SQL is the source of truthWhen database experts hand you hand-tuned SQL, translating it to LINQ and back is pure overhead. Why some teams pick Dapper over EF Core, how to use it properly in modern C#, and the four mistakes that show up again and again (materialization errors, IN lists, TransactionScope and missing cancellation).9 min read
  6. The limits of OData clients — when the LINQ abstraction leaksA fluent OData client makes a remote API feel like a DbContext, right up to the first query the server doesn't support. Lessons from integrating a CRM's OData API — server-side limits, client library bugs, a 10× performance gap and why plain HttpClient won.9 min read