Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

zdiffstore #446

Open
hellolucky opened this Issue · 5 comments

5 participants

@hellolucky

Hello,

I use sorted set to store my photo list.When A follow B, A's follow photo list and B's photo list will be zunionstore to A's follow list. But when A unfollow B, there is no zdiffstore command to handle this.Will Redis add zdiffstore command?

Felix

@kgcrom

How about using zinterstore?

zunionstore - zinterstore = list that you want
it's implement client-side.

I think that implement server side in a similar way.

@hellolucky

Sure, it's similar!

But it is slow than zdiffstore!

zdiffstore: 1 command
zunionstore - zinterstore: 3 command (zunionstore、zinterstore、store back to some key)

I use zrange & zrem to solve this problem, but it is very slow

@parrish

Just noticed this. I implemented it in #448
We've also been discussing it on the Google Group

@atomAltera

I have the same problems. When user A unfollows user B, or user B deletes, all there post have to be deleted from user A feed

@timherby

Would love to see this functionality merged in. I have the same situation (updating elements in a feed, and need a quick way to sync to an in-memory copy. I only use the sortedSet to keep the entries in-order. The scores are immutable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.