Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
nix::fetchers::CacheImpl Struct Reference
Inheritance diagram for nix::fetchers::CacheImpl:
nix::fetchers::Cache

Classes

struct  State
 

Public Member Functions

void upsert (const Key &key, const Attrs &value) override
 
std::optional< Attrslookup (const Key &key) override
 
std::optional< AttrslookupWithTTL (const Key &key) override
 
std::optional< ResultlookupExpired (const Key &key) override
 
void upsert (Key key, Store &store, Attrs value, const StorePath &storePath) override
 
std::optional< ResultWithStorePathlookupStorePath (Key key, Store &store) override
 
std::optional< ResultWithStorePathlookupStorePathWithTTL (Key key, Store &store) override
 

Public Attributes

Sync< State_state
 

Additional Inherited Members

- Public Types inherited from nix::fetchers::Cache
using Domain = std::string_view
 
using Key = std::pair<Domain, Attrs>
 

Member Function Documentation

◆ lookup()

std::optional< Attrs > nix::fetchers::CacheImpl::lookup ( const Key & key)
inlineoverridevirtual

Look up a key with infinite TTL.

Implements nix::fetchers::Cache.

◆ lookupExpired()

std::optional< Result > nix::fetchers::CacheImpl::lookupExpired ( const Key & key)
inlineoverridevirtual

Look up a key. Return a bool denoting whether its TTL has exceeded settings.tarballTTL.

Implements nix::fetchers::Cache.

◆ lookupStorePath()

std::optional< ResultWithStorePath > nix::fetchers::CacheImpl::lookupStorePath ( Key key,
Store & store )
inlineoverridevirtual

Look up a store path in the cache. The returned store path will be valid, but it may be expired.

Implements nix::fetchers::Cache.

◆ lookupStorePathWithTTL()

std::optional< ResultWithStorePath > nix::fetchers::CacheImpl::lookupStorePathWithTTL ( Key key,
Store & store )
inlineoverridevirtual

Look up a store path in the cache. Return nothing if its TTL has exceeded settings.tarballTTL.

Implements nix::fetchers::Cache.

◆ lookupWithTTL()

std::optional< Attrs > nix::fetchers::CacheImpl::lookupWithTTL ( const Key & key)
inlineoverridevirtual

Look up a key. Return nothing if its TTL has exceeded settings.tarballTTL.

Implements nix::fetchers::Cache.

◆ upsert() [1/2]

void nix::fetchers::CacheImpl::upsert ( const Key & key,
const Attrs & value )
inlineoverridevirtual

Add a key/value pair to the cache.

Implements nix::fetchers::Cache.

◆ upsert() [2/2]

void nix::fetchers::CacheImpl::upsert ( Key key,
Store & store,
Attrs value,
const StorePath & storePath )
inlineoverridevirtual

Insert a cache entry that has a store path associated with it. Such cache entries are always considered stale if the associated store path is invalid.

Implements nix::fetchers::Cache.


The documentation for this struct was generated from the following file: