AspNetCoreRateLimit icon indicating copy to clipboard operation
AspNetCoreRateLimit copied to clipboard

Add configurable Redis key prefixes

Open jacobmstein opened this issue 3 years ago • 4 comments

Redis keys are conventionally namespaced using colons to avoid naming collisions and improve readability. Additionally, bare keys often make it difficult to view database contents from GUI clients, many of which group and filter keys by namespace.

For those reasons, this pull request introduces a RedisRateLimitOptions class with a KeyPrefix property.

jacobmstein avatar Mar 22 '22 21:03 jacobmstein

Actually, wouldn't it be enough to just remove the _ when we call the policy store, then we could use ClientPolicyPrefix for the counter key as well without introducing another option?

timonmasberg avatar Mar 29 '22 15:03 timonmasberg

Actually, wouldn't it be enough to just remove the _ when we call the policy store

I suppose, however I find it unreasonable to alter its current behavior as a feature. In that case, a delimiter option (default _) needs to be added, which I'd be happy to do.

jacobmstein avatar Apr 06 '22 02:04 jacobmstein

Why not merge this MR? I'm waiting for this feature.

ShawnWang6 avatar Apr 11 '22 07:04 ShawnWang6

Will this ever get merged in? Would be very handy if it could.

baramustafa avatar Sep 28 '22 21:09 baramustafa