1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 08:31:16 +02:00

Re-implement negative binary cache lookup caching

This commit is contained in:
Eelco Dolstra 2016-06-20 17:39:05 +02:00
parent fffacd7c78
commit 74dd603495
2 changed files with 22 additions and 15 deletions

View file

@ -265,9 +265,13 @@ bool Store::isValidPath(const Path & storePath)
}
}
return isValidPathUncached(storePath);
bool valid = isValidPathUncached(storePath);
// FIXME: insert result into NARExistence table of diskCache.
if (diskCache && !valid)
// FIXME: handle valid = true case.
diskCache->upsertNarInfo(getUri(), hashPart, 0);
return valid;
}
@ -302,7 +306,7 @@ ref<const ValidPathInfo> Store::queryPathInfo(const Path & storePath)
auto info = queryPathInfoUncached(storePath);
if (diskCache && info)
if (diskCache)
diskCache->upsertNarInfo(getUri(), hashPart, info);
{