diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-02-24 18:09:00 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-02-24 18:09:00 +0100 |
commit | 8518cebfceb36f3744c276cc8dbf432b1275f53f (patch) | |
tree | 35369f7e062925259668b991ee58b4b8ac286d01 /src/libfetchers/cache.cc | |
parent | 3317866060bfb88e0113b5d6275d1ad0e3f74d8d (diff) |
libfetchers: Rename immutable -> locked
This is more consistent with flake terminology.
Diffstat (limited to 'src/libfetchers/cache.cc')
-rw-r--r-- | src/libfetchers/cache.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libfetchers/cache.cc b/src/libfetchers/cache.cc index 34ff6f85b..0c8ecac9d 100644 --- a/src/libfetchers/cache.cc +++ b/src/libfetchers/cache.cc @@ -52,13 +52,13 @@ struct CacheImpl : Cache const Attrs & inAttrs, const Attrs & infoAttrs, const StorePath & storePath, - bool immutable) override + bool locked) override { _state.lock()->add.use() (attrsToJSON(inAttrs).dump()) (attrsToJSON(infoAttrs).dump()) (store->printStorePath(storePath)) - (immutable) + (locked) (time(0)).exec(); } @@ -91,7 +91,7 @@ struct CacheImpl : Cache auto infoJSON = stmt.getStr(0); auto storePath = store->parseStorePath(stmt.getStr(1)); - auto immutable = stmt.getInt(2) != 0; + auto locked = stmt.getInt(2) != 0; auto timestamp = stmt.getInt(3); store->addTempRoot(storePath); @@ -105,7 +105,7 @@ struct CacheImpl : Cache inAttrsJSON, infoJSON, store->printStorePath(storePath)); return Result { - .expired = !immutable && (settings.tarballTtl.get() == 0 || timestamp + settings.tarballTtl < time(0)), + .expired = !locked && (settings.tarballTtl.get() == 0 || timestamp + settings.tarballTtl < time(0)), .infoAttrs = jsonToAttrs(nlohmann::json::parse(infoJSON)), .storePath = std::move(storePath) }; |