Page MenuHomePhabricator

D16033.diff
No OneTemporary

D16033.diff

diff --git a/src/applications/cache/management/PhabricatorCacheManagementPurgeWorkflow.php b/src/applications/cache/management/PhabricatorCacheManagementPurgeWorkflow.php
--- a/src/applications/cache/management/PhabricatorCacheManagementPurgeWorkflow.php
+++ b/src/applications/cache/management/PhabricatorCacheManagementPurgeWorkflow.php
@@ -26,6 +26,10 @@
'name' => 'purge-general',
'help' => pht('Purge the general cache.'),
),
+ array(
+ 'name' => 'purge-user',
+ 'help' => pht('Purge the user cache.'),
+ ),
));
}
@@ -38,6 +42,7 @@
'remarkup' => $purge_all || $args->getArg('purge-remarkup'),
'changeset' => $purge_all || $args->getArg('purge-changeset'),
'general' => $purge_all || $args->getArg('purge-general'),
+ 'user' => $purge_all || $args->getArg('purge-user'),
);
if (!array_filter($purge)) {
@@ -72,6 +77,12 @@
$this->purgeGeneralCache();
$console->writeOut("%s\n", pht('Done.'));
}
+
+ if ($purge['user']) {
+ $console->writeOut(pht('Purging user cache...'));
+ $this->purgeUserCache();
+ $console->writeOut("%s\n", pht('Done.'));
+ }
}
private function purgeRemarkupCache() {
@@ -100,4 +111,14 @@
'cache_general');
}
+ private function purgeUserCache() {
+ $table = new PhabricatorUserCache();
+ $conn_w = $table->establishConnection('w');
+
+ queryfx(
+ $conn_w,
+ 'TRUNCATE TABLE %T',
+ $table->getTableName());
+ }
+
}

File Metadata

Mime Type
text/plain
Expires
Wed, Dec 25, 10:52 AM (10 h, 17 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6925970
Default Alt Text
D16033.diff (1 KB)

Event Timeline