Summary
Align StreamTrimAsync overload signatures exactly with StackExchange.Redis in the 2.0 release.
Description
Our current signatures differ from SER in two ways:
1. int overload has defaults (SER does not):
// Ours
Task<long> StreamTrimAsync(ValkeyKey key, int maxLength, bool useApproximateMaxLength = false, CommandFlags flags = CommandFlags.None);
// SER
Task<long> StreamTrimAsync(RedisKey key, int maxLength, bool useApproximateMaxLength, CommandFlags flags);
2. long overload uses long? with default (SER uses non-nullable long):
// Ours (from pre-1.2)
Task<long> StreamTrimAsync(ValkeyKey key, long? maxLength = null, ...);
// SER
Task<long> StreamTrimAsync(RedisKey key, long maxLength, ...);
These are source-breaking changes for callers who rely on the defaults, so they should be deferred to a major version.
Proposed Solution
In 2.0:
- Remove default values from the
int overload parameters
- Change
long? maxLength = null to long maxLength in the long overload
Related
Summary
Align
StreamTrimAsyncoverload signatures exactly with StackExchange.Redis in the 2.0 release.Description
Our current signatures differ from SER in two ways:
1.
intoverload has defaults (SER does not):2.
longoverload useslong?with default (SER uses non-nullablelong):These are source-breaking changes for callers who rely on the defaults, so they should be deferred to a major version.
Proposed Solution
In 2.0:
intoverload parameterslong? maxLength = nulltolong maxLengthin thelongoverloadRelated