private function pruneNodeCache(): void
    {
        if ($this->maxItems > 0 && count($this->nodes) > $this->maxItems) {
            $this->nodes = array_slice($this->nodes, (int)($this->maxItems * 0.2), null, true);
        }
    }