Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
cache.hh
Go to the documentation of this file.
1#pragma once
3
6
7namespace nix::fetchers {
8
9struct Cache
10{
11 virtual ~Cache() { }
12
13 virtual void add(
14 ref<Store> store,
15 const Attrs & inAttrs,
16 const Attrs & infoAttrs,
17 const StorePath & storePath,
18 bool locked) = 0;
19
20 virtual kj::Promise<Result<std::optional<std::pair<Attrs, StorePath>>>> lookup(
21 ref<Store> store,
22 const Attrs & inAttrs) = 0;
23
25 {
26 bool expired = false;
27 Attrs infoAttrs;
28 StorePath storePath;
29 };
30
31 virtual kj::Promise<Result<std::optional<LookupResult>>> lookupExpired(
32 ref<Store> store,
33 const Attrs & inAttrs) = 0;
34};
35
36ref<Cache> getCache();
37
38}
Definition path.hh:21
Definition ref.hh:19
Definition cache.hh:10