From dd87d634e53fbcd4e3cd99beb56e5f68835386a2 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 12 Oct 2012 16:32:12 +0000 Subject: [PATCH] Table.pm in a refresh scenario with cache not currently in use, but existing none the less, mark the cache as invalid by setting the timestamp to 1970 Still avoid *rebuilding* the cache, as in the use_cache not set suggests a mass amount of setAttribs and build_cache(1) would be extremely expensive, just force the next consumer after the set to take the hit git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14002 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Table.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index f4e4e5f9c..94fee2c21 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -2108,6 +2108,8 @@ sub _refresh_cache { #if cache exists, force a rebuild, leaving reference counts # (uses stale nodelist data and misses new nodes, the error) #1st noderange finishes #2nd noderange finishes + } else { #even if a cache is not in use *right this second*, we need to mark any cached data that may exist as invalid, do so by suggesting the cache is from 1970 + if ($self->{_cachestamp}) { $self->{_cachestamp}=0; } } return; }