public function load($typeId, $status = Type::STATUS_DEFINED)
{
if ($status !== Type::STATUS_DEFINED) {
$this->logger->logCall(__METHOD__, array('type' => $typeId, 'status' => $status));
return $this->persistenceHandler->contentTypeHandler()->load($typeId, $status);
}
// Get cache for published content types
$cache = $this->cache->getItem('contentType', $typeId);
$type = $cache->get();
if ($cache->isMiss()) {
$this->logger->logCall(__METHOD__, array('type' => $typeId, 'status' => $status));
$cache->set($type = $this->persistenceHandler->contentTypeHandler()->load($typeId, $status))->save();
}
return $type;
}