Differential D9431 Diff 22523 src/applications/cache/management/PhabricatorCacheManagementPurgeWorkflow.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/cache/management/PhabricatorCacheManagementPurgeWorkflow.php
| Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | if (!array_filter($purge)) { | ||||
| throw new PhutilArgumentUsageException( | throw new PhutilArgumentUsageException( | ||||
| "Specify which cache or caches to purge, or use '--purge-all'. ". | "Specify which cache or caches to purge, or use '--purge-all'. ". | ||||
| "Available caches are: ".implode(', ', $list).". Use '--help' ". | "Available caches are: ".implode(', ', $list).". Use '--help' ". | ||||
| "for more information."); | "for more information."); | ||||
| } | } | ||||
| if ($purge['remarkup']) { | if ($purge['remarkup']) { | ||||
| $console->writeOut("Purging remarkup cache..."); | $console->writeOut('Purging remarkup cache...'); | ||||
| $this->purgeRemarkupCache(); | $this->purgeRemarkupCache(); | ||||
| $console->writeOut("done.\n"); | $console->writeOut("done.\n"); | ||||
| } | } | ||||
| if ($purge['changeset']) { | if ($purge['changeset']) { | ||||
| $console->writeOut("Purging changeset cache..."); | $console->writeOut('Purging changeset cache...'); | ||||
| $this->purgeChangesetCache(); | $this->purgeChangesetCache(); | ||||
| $console->writeOut("done.\n"); | $console->writeOut("done.\n"); | ||||
| } | } | ||||
| if ($purge['general']) { | if ($purge['general']) { | ||||
| $console->writeOut("Purging general cache..."); | $console->writeOut('Purging general cache...'); | ||||
| $this->purgeGeneralCache(); | $this->purgeGeneralCache(); | ||||
| $console->writeOut("done.\n"); | $console->writeOut("done.\n"); | ||||
| } | } | ||||
| } | } | ||||
| private function purgeRemarkupCache() { | private function purgeRemarkupCache() { | ||||
| $conn_w = id(new PhabricatorMarkupCache())->establishConnection('w'); | $conn_w = id(new PhabricatorMarkupCache())->establishConnection('w'); | ||||
| Show All 24 Lines | |||||