enh h3c hardware cache (#1049)
This commit is contained in:
parent
4c3e1dce93
commit
bd5e3567dc
|
@ -192,7 +192,7 @@ sub check_cache {
|
|||
my $has_cache_file = $self->{statefile_cache}->read(statefile => 'cache_h3c_entity_' . $self->{hostname} . '_' . $self->{snmp_port});
|
||||
my $timestamp_cache = $self->{statefile_cache}->get(name => 'last_timestamp');
|
||||
if ($has_cache_file == 0 ||
|
||||
!defined($timestamp_cache) || ((time() - $timestamp_cache) > (($self->{option_results}->{reload_cache_time}) * 60))) {
|
||||
!defined($timestamp_cache) || ((time() - $timestamp_cache) > (($self->{option_results}->{reload_cache_time}) * 60)) && $self->{option_results}->{reload_cache_time} != '-1') {
|
||||
push @{$self->{request}}, { oid => $oid_entPhysicalEntry, start => $oid_entPhysicalDescr, end => $oid_entPhysicalName };
|
||||
$self->{write_cache} = 1;
|
||||
}
|
||||
|
@ -315,7 +315,8 @@ Example: --critical='temperature,.*,45'
|
|||
|
||||
=item B<--reload-cache-time>
|
||||
|
||||
Time in seconds before reloading cache file (default: 180).
|
||||
Time in seconds before reloading cache file (Default: 180).
|
||||
Use '-1' to disable cache reload.
|
||||
|
||||
=back
|
||||
|
||||
|
|
Loading…
Reference in New Issue