From: short <> Date: Thu, 29 Sep 2005 09:15:11 +0000 (+0000) Subject: Remove one cache to possible cure some "headers_in" instability. X-Git-Url: http://git.jankratochvil.net/?p=www.jankratochvil.net.git;a=commitdiff_plain;h=e8924437ec0ab1a86e52f415d60c68cd1702c16f;hp=5bcefe09c90bea21270850148f8cbc4d64f473bb Remove one cache to possible cure some "headers_in" instability. --- diff --git a/project/Lib.pm b/project/Lib.pm index c89683a..4fde277 100644 --- a/project/Lib.pm +++ b/project/Lib.pm @@ -210,6 +210,7 @@ sub list($) { my($self)=@_; + # This cache is "headers_in" hits safe - only local files reading. our %list_cache; our @list_cache; if (!@list_cache) { @@ -239,15 +240,11 @@ my($class,$name)=@_; return map(($_=>$class->name_to_hashref($_)),$class->list()) if !$name; cluck join(" ","Project name \"$name\" not listed in 'list_cache':",$class->list()) if !$class->list()->{$name}; - # Do not cache &Wrequire to gets its $Id$ markers / usage map. + # Never cache anything to be stable for "headers_in" hits. Wrequire "project::${name}::Index"; - our %cache; - if (!$cache{$name}) { - my $arrayref=eval('\@project::'.$name.'::Index::ListItem'); - do { warn "Broken project/$name/Index.pm"; return undef(); } if !@$arrayref; - $cache{$name}=$class->project_arrayref_to_hashref($arrayref); - } - return $cache{$name}; + my $arrayref=eval('\@project::'.$name.'::Index::ListItem'); + do { warn "Broken project/$name/Index.pm"; return undef(); } if !@$arrayref; + return $class->project_arrayref_to_hashref($arrayref); } # $args{"ListItem"}=\%...;