aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/s3-binary-cache-store.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/s3-binary-cache-store.cc')
-rw-r--r--src/libstore/s3-binary-cache-store.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libstore/s3-binary-cache-store.cc b/src/libstore/s3-binary-cache-store.cc
index 58966a5b7..f2e4b63e0 100644
--- a/src/libstore/s3-binary-cache-store.cc
+++ b/src/libstore/s3-binary-cache-store.cc
@@ -205,11 +205,12 @@ struct S3BinaryCacheStoreImpl : public S3BinaryCacheStore
void init() override
{
- if (!diskCache->cacheExists(getUri(), wantMassQuery_, priority)) {
-
+ if (auto cacheInfo = diskCache->cacheExists(getUri())) {
+ wantMassQuery.setDefault(cacheInfo->wantMassQuery ? "true" : "false");
+ priority.setDefault(fmt("%d", cacheInfo->priority));
+ } else {
BinaryCacheStore::init();
-
- diskCache->createCache(getUri(), storeDir, wantMassQuery_, priority);
+ diskCache->createCache(getUri(), storeDir, wantMassQuery, priority);
}
}