| @@ 233-247 (lines=15) @@ | ||
| 230 | /** |
|
| 231 | * @see \eZ\Publish\SPI\Persistence\Content\ObjectState\Handler::getContentState |
|
| 232 | */ |
|
| 233 | public function getContentState($contentId, $stateGroupId) |
|
| 234 | { |
|
| 235 | $cache = $this->cache->getItem('objectstate', 'byContent', $contentId, $stateGroupId); |
|
| 236 | $stateId = $cache->get(); |
|
| 237 | if ($cache->isMiss()) { |
|
| 238 | $this->logger->logCall(__METHOD__, array('contentId' => $contentId, 'stateGroupId' => $stateGroupId)); |
|
| 239 | ||
| 240 | $contentState = $this->persistenceHandler->objectStateHandler()->getContentState($contentId, $stateGroupId); |
|
| 241 | $cache->set($contentState->id)->save(); |
|
| 242 | ||
| 243 | return $contentState; |
|
| 244 | } |
|
| 245 | ||
| 246 | return $this->load($stateId); |
|
| 247 | } |
|
| 248 | ||
| 249 | /** |
|
| 250 | * @see \eZ\Publish\SPI\Persistence\Content\ObjectState\Handler::getContentCount |
|
| @@ 125-135 (lines=11) @@ | ||
| 122 | /** |
|
| 123 | * @see \eZ\Publish\SPI\Persistence\Content\Handler::loadVersionInfo |
|
| 124 | */ |
|
| 125 | public function loadVersionInfo($contentId, $versionNo) |
|
| 126 | { |
|
| 127 | $cache = $this->cache->getItem('content', 'info', $contentId, 'versioninfo', $versionNo); |
|
| 128 | $versionInfo = $cache->get(); |
|
| 129 | if ($cache->isMiss()) { |
|
| 130 | $this->logger->logCall(__METHOD__, ['content' => $contentId, 'version' => $versionNo]); |
|
| 131 | $cache->set($versionInfo = $this->persistenceHandler->contentHandler()->loadVersionInfo($contentId, $versionNo))->save(); |
|
| 132 | } |
|
| 133 | ||
| 134 | return $versionInfo; |
|
| 135 | } |
|
| 136 | ||
| 137 | /** |
|
| 138 | * @see \eZ\Publish\SPI\Persistence\Content\Handler::loadDraftsForUser |
|