mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
Make 'nix copy' to file:// binary caches run in constant memory
This commit is contained in:
parent
400f1a9b59
commit
fc84c358d9
9 changed files with 120 additions and 87 deletions
|
@ -355,9 +355,10 @@ struct S3BinaryCacheStoreImpl : public S3BinaryCacheStore
|
|||
stats.put++;
|
||||
}
|
||||
|
||||
void upsertFile(const std::string & path, const std::string & data,
|
||||
void upsertFile(const std::string & path, Source & source,
|
||||
const std::string & mimeType) override
|
||||
{
|
||||
auto data = source.drain();
|
||||
if (narinfoCompression != "" && hasSuffix(path, ".narinfo"))
|
||||
uploadFile(path, *compress(narinfoCompression, data), mimeType, narinfoCompression);
|
||||
else if (lsCompression != "" && hasSuffix(path, ".ls"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue