pub fn insert(&mut self, items: Vec<(K, V)>) -> anyhow::Result<()> {
        for (key, value) in items {
            let latency = self.metrics.latency[&Method::Insert].start();
            anyhow::ensure!(
                Some(key) >= self.get_last_key(),
                "Keys must be inserted in sequential order"
            );
            if self.data.len() == self.capacity {
                self.data.pop_front();
            }
            self.data.push_back((key, value));
            latency.observe();
        }
        self.report_size();
        Ok(())
    }
Inserts multiple key-value pairs into the cache from an iterator. If adding these
items exceeds the cache's capacity, the oldest entries are removed. Keys can be non-unique.

# Errors

Returns an error when keys order is incorrect (a smaller key is inserted after a larger one).
core/lib/state/src/cache/sequential_cache.rs