fix: adapt RedisCacheService to StackExchange.Redis 2.13 Expiration API - #210
Conversation
fix: adapt RedisCacheService to StackExchange.Redis 2.13 Expiration API StringSetAsync no longer takes TimeSpan? — pass Expiration (implicit from TimeSpan, Expiration.Default when no TTL). Prepares for dependabot PR #209; local solution build + 436 unit tests pass on 2.13.17. Co-Authored-By: Claude Code <noreply@anthropic.com> @
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🟢 Approval recommended
The change is narrowly scoped to the known breaking API surface and the updated calls preserve prior expiration semantics.
Pull request overview
Updates DevFlow’s infrastructure caching layer to stay compatible with the StackExchange.Redis 2.13.x API change around key expiration, unblocking the dependency bump referenced in #209.
Changes:
- Bump
StackExchange.RedisNuGet package from2.8.16to2.13.17. - Update
RedisCacheService.SetAsyncoverloads to passStackExchange.Redis.Expiration(usingExpiration.Defaultwhen no TTL is provided).
File summaries
| File | Description |
|---|---|
| src/DevFlow.Infrastructure/DevFlow.Infrastructure.csproj | Updates StackExchange.Redis dependency to 2.13.17. |
| src/DevFlow.Infrastructure/Caching/RedisCacheService.cs | Migrates StringSetAsync calls from TimeSpan? to Expiration while preserving no-TTL behavior. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Description
Prepares the codebase for the StackExchange.Redis 2.8.16 -> 2.13.17 bump in #209, which currently breaks the backend build (CS1503:
StringSetAsyncnow takesStackExchange.Redis.Expirationinstead ofTimeSpan?).What's inside
RedisCacheService.SetAsync(both overloads): passExpiration- implicit conversion fromTimeSpanwhen a TTL is given,Expiration.Defaultotherwise (preserves the old no-TTL behavior).Verification
🤖 Generated with Claude Code