Skip to content

libstore: extract NarInfoDiskCacheSettings from Settings#15227

Merged
Ericson2314 merged 1 commit intoNixOS:masterfrom
obsidiansystems:narinfo-disk-cache-settings
Feb 13, 2026
Merged

libstore: extract NarInfoDiskCacheSettings from Settings#15227
Ericson2314 merged 1 commit intoNixOS:masterfrom
obsidiansystems:narinfo-disk-cache-settings

Conversation

@amaanq
Copy link
Member

@amaanq amaanq commented Feb 13, 2026

Motivation

This commit moves ttlNegativeNarInfoCache and ttlPositiveNarInfoCache into a dedicated NarInfoDiskCacheSettings struct that Settings privately inherits from, following the same pattern as LocalSettings, LogFileSettings, and WorkerSettings.

NarInfoDiskCache now takes explicit NarInfoDiskCacheSettings and SQLiteSettings in its constructor instead of reading from the global. The singleton getNarInfoDiskCache() is replaced with a NarInfoDiskCache::get() static method that accepts these settings, though they are only used on the first call (subsequent calls return the cached instance regardless of arguments).

Context

Progress on #5638


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@github-actions github-actions bot added new-cli Relating to the "nix" command store Issues and pull requests concerning the Nix store labels Feb 13, 2026
@amaanq amaanq force-pushed the narinfo-disk-cache-settings branch 4 times, most recently from af7c384 to badd6d0 Compare February 13, 2026 17:06
This commit moves `ttlNegativeNarInfoCache` and `ttlPositiveNarInfoCache` into a dedicated `NarInfoDiskCacheSettings` struct that `Settings` privately inherits from, following the same pattern as `LocalSettings`, `LogFileSettings`, and `WorkerSettings`.

`NarInfoDiskCache` now takes explicit `NarInfoDiskCacheSettings` and `SQLiteSettings` in its constructor instead of reading from the global. The singleton `getNarInfoDiskCache()` is replaced with a `NarInfoDiskCache::get()` static method that accepts these settings, though they are only used on the first call (subsequent calls return the cached instance regardless of arguments).

Progress on NixOS#5638
@amaanq amaanq force-pushed the narinfo-disk-cache-settings branch from badd6d0 to dc636dd Compare February 13, 2026 17:12
@Ericson2314 Ericson2314 added this pull request to the merge queue Feb 13, 2026
Merged via the queue into NixOS:master with commit 20f7f33 Feb 13, 2026
14 checks passed
@Ericson2314 Ericson2314 deleted the narinfo-disk-cache-settings branch February 13, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-cli Relating to the "nix" command store Issues and pull requests concerning the Nix store

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants