Skip to main content

init_trace_cache

Function init_trace_cache 

Source
pub async fn init_trace_cache(
    pool: PgPool,
    flush_interval: Duration,
    stale_threshold: Duration,
    max_traces: usize,
) -> Result<(), SqlError>
Expand description

Initialize the TraceCache, replacing any previous instance. The old background flush task is signaled to stop and any remaining traces are flushed with the NEW pool before the cache is swapped.