-Fix for bug 2873054

-Request to noderange to stop actively preserving cache now also has noderange to actively drop any current cache


git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4341 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2009-10-10 14:50:06 +00:00
parent 7672cac237
commit 8fe6b85410
2 changed files with 8 additions and 0 deletions

View File

@ -397,6 +397,12 @@ sub expandatom { #TODO: implement table selection as an atom (nodetype.os==rhels
sub retain_cache { #A semi private operation to be used *ONLY* in the interesting Table<->NodeRange module interactions.
$retaincache=shift;
unless ($retaincache) { #take a call to retain_cache(0) to also mean that any existing
#cache must be zapped
if ($nodelist) { $nodelist->_clear_cache(); }
undef $nodelist;
@allnodeset=();
}
}
sub extnoderange { #An extended noderange function. Needed as the more straightforward function return format too simple for this.
my $range = shift;

View File

@ -1949,6 +1949,8 @@ sub getAllNodeAttribs
xCAT::NodeRange::retain_cache(1);
$self->{_use_cache} = 0;
$self->{nodelist}->{_use_cache}=0;
$self->_clear_cache();
$self->{nodelist}->_clear_cache();
$self->_build_cache($attribq);
$self->{nodelist}->_build_cache(['node','groups']);
$self->{_use_cache} = 1;