Can the length of the key be set for the sortset ordered collection in Redis?
phpcn_u1582
phpcn_u1582 2017-05-16 13:18:20
0
1
861

I want to achieve the effect of ranking the top 100 in real time.
When the number of places reaches 100, the 101st piece of data will be automatically sorted when added to the sortset collection, but the 101st one after sorting needs to be deleted by coding yourself.
Does sortset have the function of limiting the key length? For example, the key is limited to 100. After 101 comes in, it is sorted and then the 101st one with the smallest weight is deleted.

phpcn_u1582
phpcn_u1582

reply all(1)
習慣沉默

Ordered sets can delete members within a certain range, insert new data, and reorder, and then delete the excess parts of the sort. For details, please take a look at the command set of ordered sets to find what you want

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template