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
4
#include "
lix/libfetchers/fetchers.hh
"
5
#include "
lix/libstore/path.hh
"
6
7
namespace
nix::fetchers {
8
9
struct
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
24
struct
LookupResult
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
36
ref<Cache>
getCache();
37
38
}
nix::StorePath
Definition
path.hh:21
nix::ref
Definition
ref.hh:19
fetchers.hh
path.hh
nix::fetchers::Cache::LookupResult
Definition
cache.hh:25
nix::fetchers::Cache
Definition
cache.hh:10
lix
libfetchers
cache.hh
Generated by
1.15.0