redis_rate icon indicating copy to clipboard operation
redis_rate copied to clipboard

Support customized redis key prefix

Open dcb9 opened this issue 3 years ago • 3 comments

Fixed key prefix limits the project potential in a complex situation

dcb9 avatar Apr 08 '22 02:04 dcb9

Hello, this issue is relevant to us, we would like to see these changes in the main branch. What's preventing the merge?

ovdienkonikolai avatar Jul 18 '23 07:07 ovdienkonikolai

I'm also interested in this feature.

I'm not a maintainer, but it looks like you're breaking the type signature of the Limiter constructor. Another approach could be to add limiter options, for example:

type LimiterOpt func(*Limiter)
func NewLimiter(rdb rediser, opts ...LimiterOpt) *Limiter {
     ...
}

freddierice avatar Jan 25 '24 21:01 freddierice

@freddierice I totally agree with you, I'll change the approach to option pattern without changing default behavior.

dcb9 avatar Jan 26 '24 06:01 dcb9