Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F726814
D65.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Jan 6, 12:48 AM
Size
1 KB
Mime Type
text/x-diff
Expires
Tue, Jan 7, 12:48 AM (2 d, 13 h ago)
Engine
blob
Format
Raw Data
Handle
536905
Attached To
D65: INP-1423 Don't use cached unit config clones in the middle of application initialization
D65.diff
View Options
Index: branches/5.3.x/core/kernel/utility/unit_config_cloner.php
===================================================================
--- branches/5.3.x/core/kernel/utility/unit_config_cloner.php
+++ branches/5.3.x/core/kernel/utility/unit_config_cloner.php
@@ -66,16 +66,17 @@
/**
* Creates unit configs, based on 'Clones' option.
*
- * @param string $prefix Unit config prefix.
+ * @param string $prefix Unit config prefix.
+ * @param boolean $with_cached Process also cached clones.
*
* @return array
*/
- public function extrude($prefix)
+ public function extrude($prefix, $with_cached = true)
{
$main_config = $this->reader->getUnitConfig($prefix);
$sub_configs = $main_config->getSetting('Clones', array());
- if ( isset($this->clones[$prefix]) ) {
+ if ( $with_cached && isset($this->clones[$prefix]) ) {
$sub_configs = array_merge($sub_configs, $this->clones[$prefix]);
}
Index: branches/5.3.x/core/kernel/utility/unit_config_reader.php
===================================================================
--- branches/5.3.x/core/kernel/utility/unit_config_reader.php
+++ branches/5.3.x/core/kernel/utility/unit_config_reader.php
@@ -478,7 +478,8 @@
$this->runAfterConfigRead($preloaded_prefix);
}
- $clones = $this->cloner->extrude($preloaded_prefix);
+ // Only use cached clones for calls in the middle of initialization (e.g. url parsing).
+ $clones = $this->cloner->extrude($preloaded_prefix, !$this->finalStage);
if ( $this->finalStage ) {
foreach ( $clones as $a_prefix ) {
Event Timeline
Log In to Comment