Fix problem where Table.pm fails to skip cache for low nodecounts

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11984 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2012-03-25 15:15:58 +00:00
parent 242fe69dbd
commit e24cc45b70

View File

@ -57,6 +57,7 @@ if ($^O =~ /^aix/i) {
use lib "$::XCATROOT/lib/perl";
my $cachethreshold=16; #How many nodes in 'getNodesAttribs' before switching to full DB retrieval
#TODO: dynamic tracking/adjustment, the point where cache is cost effective differs based on overall db size
use DBI;
$DBI::dbi_debug=9; # increase the debug output
@ -2051,7 +2052,8 @@ sub getNodesAttribs {
} else {
@attribs = @_;
}
if (scalar($nodelist) > $cachethreshold) {
#it should also be the case that cache will be used if it already is in play even if below cache threshold. This would be desired behavior
if (scalar(@$nodelist) > $cachethreshold) {
$self->{_use_cache} = 0;
$self->{nodelist}->{_use_cache}=0;
if ($self->{tabname} eq 'nodelist') { #a sticky situation