public function getContentState($contentId, $stateGroupId)
{
$cache = $this->cache->getItem('objectstate', 'byContent', $contentId, $stateGroupId);
$stateId = $cache->get();
if ($cache->isMiss()) {
$this->logger->logCall(__METHOD__, array('contentId' => $contentId, 'stateGroupId' => $stateGroupId));
$contentState = $this->persistenceHandler->objectStateHandler()->getContentState($contentId, $stateGroupId);
$cache->set($contentState->id)->save();
return $contentState;
}
return $this->load($stateId);
}