Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added caching of system node information
Applied optimization found in 2.8 for caching of system node information
- Loading branch information
Showing
1 changed file
with
6 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,12 @@ class SystemNodeProvider implements NodeProviderInterface | |
{ | ||
public function getNode() | ||
{ | ||
$node = null; | ||
static $node = null; | ||
|
||
if($node !== null) { | ||
return $node; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
fabre-thibaud
|
||
} | ||
|
||
$pattern = '/[^:]([0-9A-Fa-f]{2}([:-])[0-9A-Fa-f]{2}(\2[0-9A-Fa-f]{2}){4})[^:]/'; | ||
$matches = array(); | ||
|
||
|
I don't think this line is reachable. Am I wrong?