public function __construct(KeyValueFactoryInterface
$key_value_factory, CacheBackendInterface
$cache) { $this->keyValueFactory =
$key_value_factory;
$this->cacheBackend =
$cache;
} /**
* {@inheritdoc}
*/
public function getLastInstalledDefinition($entity_type_id) { return $this->
getLastInstalledDefinitions()[$entity_type_id] ?? NULL;
} /**
* {@inheritdoc}
*/
public function getLastInstalledDefinitions() { if ($this->entityTypeDefinitions
) { return $this->entityTypeDefinitions;
} elseif ($cache =
$this->cacheBackend->
get('entity_type_definitions.installed'
)) { $this->entityTypeDefinitions =
$cache->data;