diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-06-01T13·15+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-06-01T14·24+0200 |
commit | cf198952d02aae5585e9bb895577b5b4e7b25707 (patch) | |
tree | 2161ec8760bf9d2ca64c14c1440e7db31bb1d1be /src/libstore/local-binary-cache-store.cc | |
parent | 7850d3d27910c30232dd09dd86ee8afdaad26b90 (diff) |
HttpBinaryCacheStore: Fix caching of WantMassQuery
Also, test HttpBinaryCacheStore in addition to LocalBinaryCacheStore.
Diffstat (limited to 'src/libstore/local-binary-cache-store.cc')
-rw-r--r-- | src/libstore/local-binary-cache-store.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/libstore/local-binary-cache-store.cc b/src/libstore/local-binary-cache-store.cc index bdc80cf90fee..91d2650fe124 100644 --- a/src/libstore/local-binary-cache-store.cc +++ b/src/libstore/local-binary-cache-store.cc @@ -17,9 +17,6 @@ public: : BinaryCacheStore(params) , binaryCacheDir(binaryCacheDir) { - /* For testing the NAR info cache. */ - if (getEnv("_NIX_CACHE_FILE_URLS") == "1") - diskCache = getNarInfoDiskCache(); } void init() override; @@ -57,9 +54,6 @@ void LocalBinaryCacheStore::init() { createDirs(binaryCacheDir + "/nar"); BinaryCacheStore::init(); - - if (diskCache && !diskCache->cacheExists(getUri())) - diskCache->createCache(getUri(), storeDir, wantMassQuery_, priority); } static void atomicWrite(const Path & path, const std::string & s) @@ -96,7 +90,9 @@ static RegisterStoreImplementation regStore([]( const std::string & uri, const Store::Params & params) -> std::shared_ptr<Store> { - if (std::string(uri, 0, 7) != "file://") return 0; + if (getEnv("_NIX_FORCE_HTTP_BINARY_CACHE_STORE") == "1" || + std::string(uri, 0, 7) != "file://") + return 0; auto store = std::make_shared<LocalBinaryCacheStore>(params, std::string(uri, 7)); store->init(); return store; |