mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-27 00:06:16 +02:00
Slight simplification
This commit is contained in:
parent
21ebf6a160
commit
5df427f35b
1 changed files with 2 additions and 5 deletions
|
@ -260,11 +260,8 @@ public:
|
|||
|
||||
ref<NarInfoDiskCache> getNarInfoDiskCache()
|
||||
{
|
||||
static Sync<std::shared_ptr<NarInfoDiskCache>> cache;
|
||||
|
||||
auto cache_(cache.lock());
|
||||
if (!*cache_) *cache_ = std::make_shared<NarInfoDiskCacheImpl>();
|
||||
return ref<NarInfoDiskCache>(*cache_);
|
||||
static ref<NarInfoDiskCache> cache = make_ref<NarInfoDiskCacheImpl>();
|
||||
return cache;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue