From c14747ac04c6829a91fef3e2dea8d3bb2dbcfc00 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 12 Oct 2012 16:31:55 +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/trunk@14001 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 c3ad4d759..3a31c6b91 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -2104,6 +2104,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; }