X-Git-Url: http://git.jankratochvil.net/?a=blobdiff_plain;f=project%2FLib.pm;h=4fde2771bb5957dd0557b461277bbd7bbadc11e9;hb=e8924437ec0ab1a86e52f415d60c68cd1702c16f;hp=c89683a458bc4eadeb09d2aa70fe7f9738e8b6cc;hpb=41a02919848beeb0d53865085327a17266672fcc;p=www.jankratochvil.net.git 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"}=\%...;