Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
run_pending_tasks
to evict more entries from the cache at once
- Disable the eviction batch size when the eviction listener is not set to the cache. - So single `run_pending_tasks` call should remove all entries that can be evicted from the cache. - Add a hard-coded maintenance task timeout duration. - When the eviction listener is set, `run_pending_tasks` should stop (return) after the maintenance task timeout is elapsed. - This is a safe-guard to prevent the maintenance task from running long time when the user wrote a slow eviction listener. - In older versions, the batch size was used to limit the time spent on the maintenance task. - Not that `run_pending_tasks` checks the timeout only after processing a batch of entries, so `run_pending_tasks` can run longer than the timeout duration. - Reduce the size of the read op and write op channels.
- Loading branch information