fix: Don't discard storage_cache array (#7531)

This array has already been init in the mempools polling.
Be deleting this init, we use the $storage_cache array  populated by mempools polling, so we bypass a new snmp call.
This not just a optimisation, this also resolve issue with some WINDOWS (it timeout the second time we call hrstorage in a few second) like in #4929
This commit is contained in:
tomarch
2017-10-24 03:30:03 +02:00
committed by Tony Murray
parent a5dc4b2dc7
commit 42b1fc48de

View File

@@ -2,8 +2,6 @@
use LibreNMS\RRD\RrdDefinition;
$storage_cache = array();
foreach (dbFetchRows('SELECT * FROM storage WHERE device_id = ?', array($device['device_id'])) as $storage) {
$descr = $storage['storage_descr'];
$mib = $storage['storage_mib'];