1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 02:21:16 +02:00

Reuse eval caches and related values when possible

This commit is contained in:
Guillaume Maudoux 2024-04-19 16:21:51 +02:00
parent aa165301d1
commit a60a1f09b2
2 changed files with 23 additions and 7 deletions

View file

@ -34,6 +34,9 @@ class StorePath;
struct SingleDerivedPath;
enum RepairFlag : bool;
struct MemoryInputAccessor;
namespace eval_cache {
class EvalCache;
}
/**
@ -282,6 +285,11 @@ public:
return *new EvalErrorBuilder<T>(*this, args...);
}
/**
* A cache for evaluation caches, so as to reuse the same root value if possible
*/
std::map<const Hash, ref<eval_cache::EvalCache>> evalCaches;
private:
/* Cache for calls to addToStore(); maps source paths to the store