Skip to content
Permalink
Browse files

Improve distribution lookup cache

For a single dist CUR like this it doesn't really matter, but following the same template as CURI allows run time generated CURFS lookup to work.
  • Loading branch information...
ugexe committed Nov 1, 2017
1 parent 270b355 commit 683df8bf6c3dfd4e59e45b17df51b12b706730de
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/core/CompUnit/Repository/FileSystem.pm
@@ -18,12 +18,14 @@ class CompUnit::Repository::FileSystem does CompUnit::Repository::Locally does C
)
}

method !matching-dist($spec) {
method !matching-dist(CompUnit::DependencySpecification $spec) {
return %!seen{~$spec} if %!seen{~$spec}:exists;

my $dist = self.candidates($spec).head;
with self.candidates($spec).head {
return %!seen{~$spec} //= $_;
}

return %!seen{~$spec} //= $dist;
Nil
}

method id() {

0 comments on commit 683df8b

Please sign in to comment.
You can’t perform that action at this time.