mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-23 15:22:41 +01:00
After toggling DarkConsole, force a user settings cache fill
Summary: Ref T10078. Currently, you toggle DarkConsole and then load a page, but on the load we have to refill your settings cache since toggling DarkConsole dirtied it. This is fine, except that it makes it harder to understand what's going on with queries on a page. Just force it to reload right away instead. Test Plan: Toggled DarkConsole, reloaded page, no longer saw settings toggle-related cache fill. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10078 Differential Revision: https://secure.phabricator.com/D16044
This commit is contained in:
parent
5ba7938d54
commit
aa4ba0fa92
1 changed files with 11 additions and 0 deletions
|
@ -59,6 +59,17 @@ final class DarkConsoleController extends PhabricatorController {
|
|||
$xactions = array();
|
||||
$xactions[] = $preferences->newTransaction($key, $value);
|
||||
$editor->applyTransactions($preferences, $xactions);
|
||||
|
||||
// Reload the user to regenerate their preferences cache. If we don't
|
||||
// do this, the "Services" tab gets misleadingly spammed up with cache
|
||||
// fills that are only filling because you toggled the console or switched
|
||||
// tabs. This makes it harder to see what's really going on, so just force
|
||||
// a cache regeneration here.
|
||||
id(new PhabricatorPeopleQuery())
|
||||
->setViewer($viewer)
|
||||
->withPHIDs(array($viewer->getPHID()))
|
||||
->needUserSettings(true)
|
||||
->execute();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue