about summary refs log tree commit diff
path: root/src/libutil/lru-cache.hh
AgeCommit message (Collapse)AuthorFilesLines
2018-03-09 Fix double free in Store::queryPathInfo()Eelco Dolstra1-4/+4
It was holding on to a Value* (i.e. a std::shared_ptr<ValidPathInfo>*) outside of the pathInfoCache lock, so the std::shared_ptr could be destroyed between the release of the lock and the decrement of the std::shared_ptr refcount. This can happen if more than 'path-info-cache-size' paths are added in the meantime, *or* if clearPathInfoCache() is called. The hydra-queue-runner queue monitor thread periodically calls the later, so is likely to trigger a crash. Fixes https://github.com/NixOS/hydra/issues/542.
2017-04-06 nix-daemon: Disable path info cacheEelco Dolstra1-3/+5
This is useless because the client also caches path info, and can cause problems for long-running clients like hydra-queue-runner (i.e. it may return cached info about paths that have been garbage-collected).
2016-04-19 Move path info caching from BinaryCacheStore to StoreEelco Dolstra1-0/+6
Caching path info is generally useful. For instance, it speeds up "nix path-info -rS /run/current-system" (i.e. showing the closure sizes of all paths in the closure of the current system) from 5.6s to 0.15s. This also eliminates some APIs like Store::queryDeriver() and Store::queryReferences().
2016-02-24 TypoEelco Dolstra1-2/+2
2016-02-24 Move BinaryCacheStore / LocalBinaryCacheStore from HydraEelco Dolstra1-0/+84
So you can now do: $ NIX_REMOTE=file:///tmp/binary-cache nix-store -qR /nix/store/...