Implement milestone v12.5 — Core API Gaps#655
Merged
Conversation
…, #654) Add six enhancements closing the v12.5 milestone: - IDistributedCache adapter with Hash-based sliding expiration, compatible with Microsoft.Extensions.Caching.StackExchangeRedis (#632) - ASP.NET Core Health Check monitoring all connection pools with Healthy/Degraded/Unhealthy states based on pool health and PING (#633) - StringIncrementAsync/StringDecrementAsync with long and double overloads for atomic counter operations (#634) - SetCombineAsync/SetCombineAndStoreAsync for union, intersect, and difference operations on Redis Sets (#635) - Key Management: KeyRenameAsync, KeyTypeAsync, KeyDumpAsync, KeyRestoreAsync for key-level operations (#636) - .NET 8+ Keyed DI Services registering named IRedisClient and IRedisDatabase via [FromKeyedServices("name")] (#654) Version bumped from 12.2.0 to 12.5.0 with release notes. 1125 tests passing (net10.0), 0 failures. Closes #632, closes #633, closes #634, closes #635, closes #636, closes #654
Update README with usage examples for IDistributedCache, Health Check, Keyed DI Services, atomic counters, set combine, and key management. Add dedicated doc pages for Health Check and IDistributedCache adapter. Update Multiple Servers doc with Keyed DI ([FromKeyedServices]) usage. Update ASP.NET Core integration doc with Health Check and IDistributedCache setup.
Add IDistributedCache, Health Check, Keyed DI, atomic counters, Set Combine, and Key Management to llms.txt feature index. Update configure skill with Health Check, IDistributedCache, and Keyed DI registration examples. Update scaffold skill with atomic counter, Set Combine, Key Management, and IDistributedCache code patterns. Update diagnose skill with IDistributedCache and Keyed DI troubleshooting sections.
- Microsoft.SourceLink.GitHub 10.0.201 → 10.0.300 (13 projects) - Microsoft.VisualStudio.Threading.Analyzers [17.14.*,18.0.0) → [18.7.*,19.0.0) - coverlet.collector 8.0.1 → 10.0.1 - Microsoft.NET.Test.Sdk 18.4.0 → 18.7.0 - Remove local Threading.Analyzers version override from AspNetCore project Claude-Session: https://claude.ai/code/session_01QeGdCh7izfbG3VGzSoVzgQ
RedisHealthCheck: - Catch RedisConnectionException (most common production failure) - PING each client individually, not just the default - Handle empty GetAllClients() with clear error message - Honor CancellationToken RedisDistributedCache: - Add null guards on constructor and all public methods - Add CancellationToken.ThrowIfCancellationRequested() on all async methods - Replace dead code (results.Length == 0) with correct null check - Validate AbsoluteExpiration is in the future IRedisClient: - Extract const DefaultName to eliminate duplicate "default" literals Tests: - Health check: PING failure paths (RedisException, RedisTimeoutException, RedisConnectionException), empty clients, multi-client degraded - Distributed cache: combined absolute+sliding TTL, absolute shorter than sliding, DateTimeOffset absolute, past expiration throws - Keyed DI: default services alongside keyed, empty Name skips registration Claude-Session: https://claude.ai/code/session_01QeGdCh7izfbG3VGzSoVzgQ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements all 6 issues in the v12.5 milestone, closing the "Core API Gaps" release:
RedisDistributedCachewith Hash-based storage (data/absexp/sldexpfields), sliding expiration refresh on Get, and Microsoft.Extensions.Caching.StackExchangeRedis-compatible schema. Registered viaservices.AddRedisDistributedCache().RedisHealthCheckiterates allIRedisClientFactoryclients, checks pool active/invalid connections, and PINGs the default database. Returns Healthy/Degraded/Unhealthy. Registered viabuilder.AddRedisExtensionsHealthCheck().longwith default=1,doublewithout default) delegating directly to SE.Redis.SetCombineAsync<T>(2-key and multi-key) with deserialization, plusSetCombineAndStoreAsyncfor server-side storage.KeyRenameAsync,KeyTypeAsync,KeyDumpAsync,KeyRestoreAsync— thin wrappers over SE.Redis key operations.IRedisClientandIRedisDatabaseregistered as keyed singletons whenRedisConfiguration.Nameis set. Supports[FromKeyedServices("name")]in .NET 8+.Version bumped from 12.2.0 to 12.5.0.
Documentation
doc/health-check.md— setup, status conditions, configurationdoc/distributed-cache.md— setup, expiration behavior, storage format, key prefix detailsdoc/multipleServers.md— added Keyed DI Services with[FromKeyedServices]examplesdoc/asp.net-core/README.md— added Health Check and IDistributedCache setup sectionsTest plan
Massive_Add_With_Expiring)