Skip to content

Commit d5d4baf

Browse files
authored
Merge pull request #14620 from NixOS/revert-shared-tarball-cache
libfetchers: Don't have a single shared tarball cache
2 parents bd11043 + 385d7e7 commit d5d4baf

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/libfetchers/git-utils.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,10 +1334,8 @@ namespace fetchers {
13341334

13351335
ref<GitRepo> Settings::getTarballCache() const
13361336
{
1337-
auto tarballCache(_tarballCache.lock());
1338-
if (!*tarballCache)
1339-
*tarballCache = GitRepo::openRepo(std::filesystem::path(getCacheDir()) / "tarball-cache", true, true);
1340-
return ref<GitRepo>(*tarballCache);
1337+
static auto repoDir = std::filesystem::path(getCacheDir()) / "tarball-cache";
1338+
return GitRepo::openRepo(repoDir, true, true);
13411339
}
13421340

13431341
} // namespace fetchers

src/libfetchers/include/nix/fetchers/fetch-settings.hh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,6 @@ struct Settings : public Config
135135

136136
private:
137137
mutable Sync<std::shared_ptr<Cache>> _cache;
138-
139-
mutable Sync<std::shared_ptr<GitRepo>> _tarballCache;
140138
};
141139

142140
} // namespace nix::fetchers

0 commit comments

Comments
 (0)