*/ private array $cache = []; public function __construct(private readonly CollationMetadataProvider $collationMetadataProvider) { } public function getCollationCharset(string $collation): ?string { if (array_key_exists($collation, $this->cache)) { return $this->cache[$collation]; } return $this->cache[$collation] = $this->collationMetadataProvider->getCollationCharset($collation); } }