Function dipstick::cache [] [src]

pub fn cache<IS, S>(size: usize, sink: IS) -> MetricCache<S> where
    IS: IntoSink<S>,
    S: MetricSink

Cache metrics to prevent them from being re-defined on every use. Use of this should be transparent, this has no effect on the values. Stateful sinks (i.e. Aggregate) may naturally cache their definitions.