TEMEL
Giriş
Bu doküman Redis özelliklerinin .NET Core projelerinde nasıl implemente edileceğini anlatır. Her bölüm önce Redis kavramını kısaca açıklar, ardından sekmeli yapıda Redis CLI ve .
Redis 8 · .NET 10 · StackExchange.Redis 2.13+ · Son güncelleme: Mayıs 2026 Her bölüm: Kavram → Redis CLI → .NET Core implementasyonu
Nasıl kullanılır?
- Temel — Kurulum, bağlantı yönetimi, key naming, temel CRUD (String, Hash, List, Set, Sorted Set).
- Orta — Caching patterns (+ HybridCache), Pub/Sub, Streams, Transactions/Lua, Geo, HyperLogLog, Key Expiration.
- İleri — Distributed Lock (+ Redlock), Rate Limiting, Client-Side Caching, Pipeline/Batch, Replication, Cluster, Testing.
- Uzman — Health Check, Exception Handling, Security (ACL/TLS), Session Management, Monitoring, Output Cache, SignalR, Persistence.
Tüm .NET örnekleri StackExchange.Redis (multiplexed, thread-safe) + IDistributedCache pattern'ları kullanır.
Versiyon Uyumluluk Matrisi
| Özellik | Min Redis | Min SE.Redis | Notlar |
|---|---|---|---|
| Temel CRUD, TTL | 2.6+ | 1.0+ | Her ortamda çalışır |
| Lua Scripting | 2.6+ | 1.0+ | ScriptEvaluateAsync |
| Pub/Sub | 2.0+ | 1.0+ | Pattern subscribe 2.8+ |
| HyperLogLog | 2.8.9+ | 1.1+ | |
| Streams & Consumer Groups | 5.0+ | 2.0+ | StreamReadGroupAsync |
| ACL (username + password) | 6.0+ | 2.1+ | ConfigurationOptions.User |
| Client-Side Caching (RESP3) | 6.0+ | 2.6.100+ | Protocol = RedisProtocol.Resp3 |
| RESP3 push notifications | 6.0+ | 2.6.100+ | |
| Cluster hash slot routing | 3.0+ | 1.2+ | Otomatik MOVED/ASK handling |
| TLS 1.3 | 6.0+ | 2.0+ | SslProtocols.Tls13 |
| Sub-millisecond expiry (PEXPIRE) | 2.6+ | 1.0+ |