Changeset View
Changeset View
Standalone View
Standalone View
src/applications/paste/query/PhabricatorPasteQuery.php
| Show First 20 Lines • Show All 167 Lines • ▼ Show 20 Lines | final class PhabricatorPasteQuery | ||||
| private function getContentCacheKey(PhabricatorPaste $paste) { | private function getContentCacheKey(PhabricatorPaste $paste) { | ||||
| return implode( | return implode( | ||||
| ':', | ':', | ||||
| array( | array( | ||||
| 'P'.$paste->getID(), | 'P'.$paste->getID(), | ||||
| $paste->getFilePHID(), | $paste->getFilePHID(), | ||||
| $paste->getLanguage(), | $paste->getLanguage(), | ||||
| PhabricatorHash::digestForIndex($paste->getTitle()), | |||||
| )); | )); | ||||
| } | } | ||||
| private function getSnippetCacheKey(PhabricatorPaste $paste) { | private function getSnippetCacheKey(PhabricatorPaste $paste) { | ||||
| return implode( | return implode( | ||||
| ':', | ':', | ||||
| array( | array( | ||||
| 'P'.$paste->getID(), | 'P'.$paste->getID(), | ||||
| $paste->getFilePHID(), | $paste->getFilePHID(), | ||||
| $paste->getLanguage(), | $paste->getLanguage(), | ||||
| 'snippet', | 'snippet', | ||||
| PhabricatorHash::digestForIndex($paste->getTitle()), | |||||
| )); | )); | ||||
| } | } | ||||
| private function loadRawContent(array $pastes) { | private function loadRawContent(array $pastes) { | ||||
| $file_phids = mpull($pastes, 'getFilePHID'); | $file_phids = mpull($pastes, 'getFilePHID'); | ||||
| $files = id(new PhabricatorFileQuery()) | $files = id(new PhabricatorFileQuery()) | ||||
| ->setParentQuery($this) | ->setParentQuery($this) | ||||
| ->setViewer($this->getViewer()) | ->setViewer($this->getViewer()) | ||||
| ▲ Show 20 Lines • Show All 194 Lines • Show Last 20 Lines | |||||