mirror of
https://github.com/NixOS/nix
synced 2025-06-27 00:11:17 +02:00
Re-implement the WantMassQuery property of binary caches
This commit is contained in:
parent
b66ab6cdbc
commit
e222484401
8 changed files with 40 additions and 8 deletions
|
@ -113,13 +113,13 @@ public:
|
|||
return i->second;
|
||||
}
|
||||
|
||||
void createCache(const std::string & uri) override
|
||||
void createCache(const std::string & uri, bool wantMassQuery, int priority) override
|
||||
{
|
||||
auto state(_state.lock());
|
||||
|
||||
// FIXME: race
|
||||
|
||||
state->insertCache.use()(uri)(time(0))(settings.nixStore)(1)(0).exec();
|
||||
state->insertCache.use()(uri)(time(0))(settings.nixStore)(wantMassQuery)(priority).exec();
|
||||
assert(sqlite3_changes(state->db) == 1);
|
||||
state->caches[uri] = sqlite3_last_insert_rowid(state->db);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue