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

Support of keyspace events #182

Open
boahwas opened this issue Dec 16, 2020 · 7 comments
Open

Support of keyspace events #182

boahwas opened this issue Dec 16, 2020 · 7 comments

Comments

@boahwas
Copy link

boahwas commented Dec 16, 2020

Maybe I didnt get it but when is use miniredis instead of go-redis and listening to the keypace events like:

client := redis.NewClient(&redis.Options{
Addr: s.Addr(),
})
client.ConfigSet("notify-keyspace-events", "Kx")
...
sub := client.PSubscribe("__keyspace@0__:" + key)
_ = <-sub.Channel()

Do I get a notification on the channel when a key expires

when i call s.FastForward(x) in my tests

(in go-redis everything works as expected)

thanks for your time

@alicebob
Copy link
Owner

alicebob commented Dec 17, 2020 via email

@alicebob
Copy link
Owner

Found the docs: https://redis.io/topics/notifications

yes, there is no support for that right now. Doesn't seem impossible to add, but it's a lot of events. Which events are you most interested in? Mostly the x (expired) events?

@boahwas
Copy link
Author

boahwas commented Dec 23, 2020

For now I would be fine with the expired events. ^^

@sperahd
Copy link

sperahd commented May 29, 2021

@alicebob Is this in pipeline, I'd like to contribute if not.

@alicebob
Copy link
Owner

alicebob commented May 30, 2021 via email

@walkerobrien
Copy link

has there been any progress on this? I'm also looking to use a feature like this in my tests as I use redis to subscribe to expired events

@alicebob
Copy link
Owner

alicebob commented Jan 16, 2024 via email

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

4 participants