mirror of
https://github.com/NixOS/nix
synced 2025-06-29 14:53:16 +02:00
Merge pull request #9794 from hercules-ci/queryPathInfoFromClientCache
refactor: Extract `Store::queryPathInfoFromClientCache`
This commit is contained in:
commit
382fa51ff0
2 changed files with 53 additions and 25 deletions
|
@ -282,6 +282,16 @@ public:
|
|||
void queryPathInfo(const StorePath & path,
|
||||
Callback<ref<const ValidPathInfo>> callback) noexcept;
|
||||
|
||||
/**
|
||||
* Version of queryPathInfo() that only queries the local narinfo cache and not
|
||||
* the actual store.
|
||||
*
|
||||
* @return `std::nullopt` if nothing is known about the path in the local narinfo cache.
|
||||
* @return `std::make_optional(nullptr)` if the path is known to not exist.
|
||||
* @return `std::make_optional(validPathInfo)` if the path is known to exist.
|
||||
*/
|
||||
std::optional<std::shared_ptr<const ValidPathInfo>> queryPathInfoFromClientCache(const StorePath & path);
|
||||
|
||||
/**
|
||||
* Query the information about a realisation.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue