1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-13 22:12:43 +01:00

libstore: Disable path info cache for dummy store

This commit is contained in:
Sergei Zimmerman 2025-09-20 12:10:48 +03:00
parent 341878ce0f
commit ed9b377928
No known key found for this signature in database

View file

@ -4,10 +4,15 @@ namespace nix {
struct DummyStoreConfig : public std::enable_shared_from_this<DummyStoreConfig>, virtual StoreConfig
{
using StoreConfig::StoreConfig;
DummyStoreConfig(const Params & params)
: StoreConfig(params)
{
// Disable caching since this a temporary in-memory store.
pathInfoCacheSize = 0;
}
DummyStoreConfig(std::string_view scheme, std::string_view authority, const Params & params)
: StoreConfig(params)
: DummyStoreConfig(params)
{
if (!authority.empty())
throw UsageError("`%s` store URIs must not contain an authority part %s", scheme, authority);