Resolving Issue #252

This commit is contained in:
cigamit committed 2017-02-01 21:27:21 -06:00
1 parent 72aeb5015d
commit 4ead5539ef
1 file changed
-15
-15
View File
@@ -723,8 +723,6 @@ function rrdtool_function_tune($rrd_tune_array) {
function rrdtool_function_fetch($local_data_id, $start_time, $end_time, $resolution = 0, $show_unknown = false, $rrdtool_file = null, $cf = 'AVERAGE') {
global $config;
static $rrd_fetch_cache = array();
include_once($config['library_path'] . '/boost.php');
/* validate local data id */
@@ -732,14 +730,6 @@ function rrdtool_function_fetch($local_data_id, $start_time, $end_time, $resolut
return array();
}
/* the cache hash is used to identify unique items in the cache */
$current_hash_cache = md5($local_data_id . $start_time . $end_time . $resolution . $show_unknown . $rrdtool_file);
/* return the cached entry if available */
if (isset($rrd_fetch_cache[$current_hash_cache])) {
return $rrd_fetch_cache[$current_hash_cache];
}
/* initialize fetch array */
$fetch_array = array();
@@ -818,11 +808,6 @@ function rrdtool_function_fetch($local_data_id, $start_time, $end_time, $resolut
$rrd_fetch_cache = array();
}
/* update the cache */
if (MAX_FETCH_CACHE_SIZE > 0) {
$rrd_fetch_cache[$current_hash_cache] = $fetch_array;
}
return $fetch_array;
}