diff --git a/src/RedisRateLimiting/SlidingWindow/RedisSlidingWindowManager.cs b/src/RedisRateLimiting/SlidingWindow/RedisSlidingWindowManager.cs index d74aa26..c6dcf57 100644 --- a/src/RedisRateLimiting/SlidingWindow/RedisSlidingWindowManager.cs +++ b/src/RedisRateLimiting/SlidingWindow/RedisSlidingWindowManager.cs @@ -10,7 +10,7 @@ internal class RedisSlidingWindowManager private readonly IConnectionMultiplexer _connectionMultiplexer; private readonly RedisSlidingWindowRateLimiterOptions _options; private readonly RedisKey RateLimitKey; - private readonly string StatsRateLimitKey; + private readonly RedisKey StatsRateLimitKey; private static readonly LuaScript _redisScript = LuaScript.Prepare( @"local limit = tonumber(@permit_limit) @@ -54,7 +54,7 @@ public RedisSlidingWindowManager( _connectionMultiplexer = options.ConnectionMultiplexerFactory!.Invoke(); RateLimitKey = new RedisKey($"rl:{{{partitionKey}}}"); - StatsRateLimitKey = $"rl:{partitionKey}:stats"; + StatsRateLimitKey = new RedisKey($"rl:{{{partitionKey}}}:stats"); } internal async Task TryAcquireLeaseAsync(string requestId)