![]() |
Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
|
#include <nar-cache.hh>
Public Member Functions | |
| NarCache (std::optional< std::filesystem::path > cacheDir={}) | |
| ref< SourceAccessor > | getOrInsert (const Hash &narHash, fun< void(Sink &)> populate) |
A cache for NAR accessors with optional disk caching.
| nix::NarCache::NarCache | ( | std::optional< std::filesystem::path > | cacheDir = {} | ) |
Create a NAR cache with an optional cache directory for disk storage.
| ref< SourceAccessor > nix::NarCache::getOrInsert | ( | const Hash & | narHash, |
| fun< void(Sink &)> | populate ) |
Lookup or create a NAR accessor, optionally using disk cache.
| narHash | The NAR hash to use as cache key |
| populate | Function called with a Sink to populate the NAR if not cached |