Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to clear old keys? #64

Open
chetan-codehub opened this issue Jul 14, 2021 · 1 comment
Open

how to clear old keys? #64

chetan-codehub opened this issue Jul 14, 2021 · 1 comment

Comments

@chetan-codehub
Copy link

At any point if we want to clear data (that is created and used by rate_limit) from redis, how to do it?

something like :

rateLimiter.Clear("key") or rateLimiter.Flush()

@tikhomirovv
Copy link

tikhomirovv commented Jun 19, 2024

@chetan-codehub, I suppose it should be like this:

rateLimiter := redis_rate.NewLimiter(rdb)
ctx := context.Background()
err := rateLimiter.Reset(ctx, "key")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants