Added caching of system node information

Applied optimization found in 2.8 for caching of system node information
This commit is contained in:
Jesper Pedersen
2015-06-15 09:27:04 +02:00
committed by Ben Ramsey
parent a9d4f93ab7
commit 7fe43508a4
+6 -1
View File
@@ -8,7 +8,12 @@ class SystemNodeProvider implements NodeProviderInterface
{
public function getNode()
{
$node = null;
static $node = null;
if($node !== null) {
return $node;
}
$pattern = '/[^:]([0-9A-Fa-f]{2}([:-])[0-9A-Fa-f]{2}(\2[0-9A-Fa-f]{2}){4})[^:]/';
$matches = array();