mirror of
https://github.com/NixOS/nix.git
synced 2025-11-14 06:22:42 +01:00
libstore: Disable path info cache for dummy store
This commit is contained in:
parent
341878ce0f
commit
ed9b377928
1 changed files with 7 additions and 2 deletions
|
|
@ -4,10 +4,15 @@ namespace nix {
|
||||||
|
|
||||||
struct DummyStoreConfig : public std::enable_shared_from_this<DummyStoreConfig>, virtual StoreConfig
|
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)
|
DummyStoreConfig(std::string_view scheme, std::string_view authority, const Params & params)
|
||||||
: StoreConfig(params)
|
: DummyStoreConfig(params)
|
||||||
{
|
{
|
||||||
if (!authority.empty())
|
if (!authority.empty())
|
||||||
throw UsageError("`%s` store URIs must not contain an authority part %s", scheme, authority);
|
throw UsageError("`%s` store URIs must not contain an authority part %s", scheme, authority);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue