Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14411490
D16033.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D16033.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D16033: Add --purge-user to bin/cache purge
Attached
Detach File
Event Timeline
Log In to Comment