sewenew / redis-plus-plus

Redis client written in C++
Apache License 2.0
1.64k stars 351 forks source link

[FEATURE] support XTRIM MINID #405

Closed steve-numeus closed 2 years ago

steve-numeus commented 2 years ago

Is your feature request related to a problem? Please describe. Currently only XTRIM MAXLEN is supported by redis-plus-plus; however redis also supports XTRIM MINID

MINID: Evicts entries with IDs lower than threshold, where threshold is a stream ID.

Describe the solution you'd like Add MINID overload to xtrim

sewenew commented 2 years ago

Thanks for the proposal! I'll add an overload for it.

Before that, you can use the generic interface to send XTRIM command with MINID:

redis.command<long long>("XTRIM", key, "MINID", id, "LIMIT", count);

Regards

steve-numeus commented 2 years ago

Great, thanks!

sewenew commented 2 years ago

@steve-numeus This feature is done. Please take the latest code to have a try.

Regards

steve-numeus commented 2 years ago

Thank you!

sewenew commented 2 years ago

Take it easy. If you like the project, feel free to spread it and star it :)

Regards