-
Notifications
You must be signed in to change notification settings - Fork 588
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
Truncate cache if max_messages
is set to a lower value at runtime
#2957
Truncate cache if max_messages
is set to a lower value at runtime
#2957
Conversation
Can this be retargetted and reimplemented on |
60c5163
to
bdcad72
Compare
bdcad72
to
18056b1
Compare
Re-implemented on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but if you can just change to using VecDeque::drain
instead of that manual pop_front
loop that would be lovely.
18056b1
to
c8695d0
Compare
Just a small commit that removes excess messages from cache if
Settings::max_messages
is changed at runtime throughset_max_messages
. Lot of iteration, but I couldn't think of a faster way to do it.Address #2884.