public function update($typeId, $status, UpdateStruct $struct)
{
$this->logger->logCall(__METHOD__, array('type' => $typeId, 'status' => $status, 'struct' => $struct));
if ($status !== Type::STATUS_DEFINED) {
return $this->persistenceHandler->contentTypeHandler()->update($typeId, $status, $struct);
}
// Warm cache
$this->cache->getItem('contentType', $typeId)->set($type = $this->persistenceHandler->contentTypeHandler()->update($typeId, $status, $struct))->save();
// Clear identifier cache in case it was changed before warming the new one
$this->cache->clear('contentType', 'identifier');
$this->cache->clear('searchableFieldMap');
$this->cache->getItem('contentType', 'identifier', $type->identifier)->set($typeId)->save();
return $type;
}