Skip to main content

eviction_task

Function eviction_task 

Source
pub async fn eviction_task(filters: Filters)
Expand description

Background task that periodically evicts stale filters.

This task runs an infinite loop that calls Filters::evict() at regular intervals based on the filter keepalive duration. It ensures that filters which haven’t been polled are automatically removed to prevent memory leaks.

The task should be spawned once when the filter system is initialized and will run for the lifetime of the application.