You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe that this is the only method to change max_messages at runtime after creation:
/// Sets the maximum amount of messages per channel to cache.////// By default, no messages will be cached.pubfnset_max_messages(&self,max:usize){self.settings.write().max_messages = max;}
I'll make it check if the argument max is less than max_messages by reading the settings since checking it after assigning the new value should take more time. And if it is greater, delete the messages from Cache.messages that correspond to the front of Cache.message_queue for each channel's queue. Does that sound good?
I'm not sure if we had this at some point but we certainly don't now, if max messages is reduced at runtime any amount set over the limit is kept.
The text was updated successfully, but these errors were encountered: