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
Hi. Thank you for reporting the issue, and sorry for the late reply. I got COVID-19 for the first time in the middle of March. I was treated for pneumonia in the hospital but had a high fever for 10+ days. I am still recovering, and am slowly getting better.
Anyway. You are right. The eviction batch size can be improved.
Is it reasonable to always run the maintenance task when the total weighted size exceeds the capacity (or 10% beyond the capacity)?
Yeah, that will help. Let me think of some other options too. I will probably disable the batch size limit when cache has no eviction listener given. We use the batch size to avoid to spend too long time on the maintenance task when the user provided a very slow eviction listener closure. Spending too long time on it may block cache writes (insert etc.) because something called "write operation log channel" can get full. So, if no eviction listener is provided, we would not need the limit.
I will start to implement them when I feel better on my health.
Example code (LRU policy, moka 0.12.5):
Output:
After inserting 4096 16k-size values, the total weighted size increases and exceeds the 16M capacity.
The text was updated successfully, but these errors were encountered: