From 569d3e045efe7d15ecbf4331d093c83f48d3cc38 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Fri, 8 Dec 2023 13:45:51 +0100 Subject: build_utils: Be specific in target cache entry store location... ...by specifying which TargetCache instance to use. This will allow 'just serve' to store target cache entries into the correct sharded location. --- src/buildtool/main/build_utils.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/buildtool/main/build_utils.cpp') diff --git a/src/buildtool/main/build_utils.cpp b/src/buildtool/main/build_utils.cpp index 50557b71..2453e5e6 100644 --- a/src/buildtool/main/build_utils.cpp +++ b/src/buildtool/main/build_utils.cpp @@ -70,7 +70,8 @@ void WriteTargetCacheEntries( std::size_t jobs, gsl::not_null const& local_api, gsl::not_null const& remote_api, - TargetCacheWriteStrategy strategy) { + TargetCacheWriteStrategy strategy, + TargetCache const& tc) { if (strategy == TargetCacheWriteStrategy::Disable) { return; } @@ -88,8 +89,7 @@ void WriteTargetCacheEntries( }; for (auto const& [key, target] : cache_targets) { if (auto entry = TargetCacheEntry::FromTarget(target, extra_infos)) { - if (not Storage::Instance().TargetCache().Store( - key, *entry, downloader)) { + if (not tc.Store(key, *entry, downloader)) { Logger::Log(LogLevel::Warning, "Failed writing target cache entry for {}", key.Id().ToString()); -- cgit v1.2.3