|
4 | 4 | Directory.Build.props --> |
5 | 5 | <AssemblyName>Reliable.HttpClient.Caching</AssemblyName> |
6 | 6 | <PackageId>Reliable.HttpClient.Caching</PackageId> |
7 | | - <Version>1.3.0</Version> |
8 | | - <PackageReleaseNotes>🎉 v1.3.0 Release - PATCH Method Support & Enhanced Caching! |
| 7 | + <Version>1.4.0</Version> |
| 8 | + <PackageReleaseNotes>🎉 v1.4.0 Release - Dependency Injection Enhancement; Backward |
| 9 | + Compatibility! |
| 10 | + |
| 11 | + Major Bug Fix: |
| 12 | + |
| 13 | + • Fixed HttpClientWithCache concrete type resolution from Dependency Injection container |
| 14 | + (Issue #5) |
| 15 | + • Both IHttpClientWithCache interface and HttpClientWithCache concrete type now resolvable |
| 16 | + from DI |
| 17 | + • Maintains complete backward compatibility with existing API signatures |
| 18 | + • Scoped service registration to avoid captive dependencies with internal HttpClient |
| 19 | + |
| 20 | + API Enhancements: |
| 21 | + |
| 22 | + • AddHttpClientWithCache now supports both HttpCacheOptions and |
| 23 | + Action<HttpCacheOptions>patterns |
| 24 | + • Dual registration: services.GetService<HttpClientWithCache>() and |
| 25 | + services.GetService<IHttpClientWithCache>() both work |
| 26 | + • Same singleton instance returned for both interface and concrete type requests |
| 27 | + • Comprehensive test coverage ensuring proper DI resolution behavior |
| 28 | + |
| 29 | + Backward Compatible Overloads: |
| 30 | + |
| 31 | + // Original API - preserved for backward compatibility |
| 32 | + services.AddHttpClientWithCache("client", cacheOptions); |
| 33 | + |
| 34 | + // New API - Action<T> configuration pattern |
| 35 | + services.AddHttpClientWithCache("client", options => options.DefaultExpiry = |
| 36 | + TimeSpan.FromMinutes(5)); |
| 37 | + |
| 38 | + Key Benefits: |
| 39 | + |
| 40 | + • Access to HttpClientWithCache-specific members not exposed through IHttpClientWithCache |
| 41 | + • Better integration with existing DI-based architectures |
| 42 | + • Follows .NET dependency injection best practices |
| 43 | + • Maintains performance and simplicity for basic scenarios |
| 44 | + |
| 45 | + Previous Features (v1.3.0): |
9 | 46 |
|
10 | | - ✨ Major New Features: |
11 | 47 | • Complete HTTP PATCH method support in HttpClientWithCache and CachedHttpClient<T> |
12 | | - • Four PATCH method overloads matching main HttpClient module capabilities |
13 | | - • Intelligent cache invalidation for PATCH operations - responses not cached, but related |
14 | | - cache entries invalidated |
15 | | - • Full header support for PATCH operations including OAuth and authentication scenarios |
16 | | - • Smart error handling - cache remains intact if PATCH operation fails |
17 | | - |
18 | | - 🔧 API Enhancements: |
19 | | - • PatchAsync<TRequest, TResponse>(uri, request) - Typed request/response with cache |
20 | | - invalidation |
21 | | - • PatchAsync<TRequest, TResponse>(uri, request, headers) - With custom headers support |
22 | | - • PatchAsync<TRequest>(uri, request) - Returns raw HttpResponseMessage |
23 | | - • PatchAsync<TRequest>(uri, request, headers) - Raw response with headers |
24 | | - • Consistent caching behavior: GET operations cached, mutating operations (POST, PUT, PATCH) |
25 | | - invalidate cache |
26 | | - • Comprehensive test coverage (336+ tests) validating all PATCH scenarios |
27 | | - |
28 | | - 🎯 Key Use Cases: |
29 | | - • RESTful API updates with intelligent cache management |
30 | | - • Partial resource updates with cache invalidation patterns |
31 | | - • Authentication-aware PATCH operations with header support |
32 | | - • Multi-tenant PATCH operations with isolated cache invalidation |
33 | | - • Error-resilient updates that preserve cache integrity on failures |
34 | | - |
35 | | - 🚀 Quick Start: |
36 | | - // PATCH with automatic cache invalidation |
37 | | - var updated = await client.PatchAsync<UpdateRequest, UserResponse>("/users/123", |
38 | | - request); |
39 | | - |
40 | | - // PATCH with headers and cache management |
41 | | - await client.PatchAsync("/api/resource", data, headers); |
42 | | - |
43 | | - 🔄 Previous Features (v1.2.0): |
| 48 | + • Intelligent cache invalidation for PATCH operations |
44 | 49 | • Full custom headers support matching main HttpClient module capabilities |
45 | | - • DefaultHeaders property in HttpCacheOptions for static headers across all cached requests |
46 | | - • Per-request headers support in all HTTP methods (GET, POST, PUT, DELETE) |
| 50 | + • Per-request headers support in all HTTP methods (GET, POST, PUT, DELETE, PATCH) |
47 | 51 | • Intelligent cache key generation that includes headers for proper cache isolation |
48 | | - • Enhanced HttpClientWithCache with comprehensive header support |
49 | 52 |
|
50 | 53 | 📚 Full documentation: https://github.com/akrisanov/Reliable.HttpClient |
51 | 54 |
|
|
0 commit comments