Fix Table.pm to absolutely refuse to use cache when unusable

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9744 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2011-06-06 18:47:13 +00:00
parent 21490e591b
commit ea0fe3acd6

View File

@ -350,7 +350,12 @@ sub _set_use_cache {
if ($dbworkerpid) {
return dbc_call($self,'_set_use_cache',@_);
}
$self->{_use_cache} = shift;
my $usecache = shift;
if ($usecache and not $self->{_tablecache}) {
return; #do not allow cache to be enabled while the cache is broken
}
$self->{_use_cache} = $usecache;
}
#--------------------------------------------------------------------------------