magic-nix-cache-action icon indicating copy to clipboard operation
magic-nix-cache-action copied to clipboard

Is it possible to support multiple upstream caches?

Open ipetkov opened this issue 1 year ago • 1 comments

My use case is I have a cachix cache which is set to not cache anything already present in cache.nixos.org. In my builds I'd like for the magic-cache to only contain anything not present in either of my cache or cache.nixos.org, so there is no obviously correct (to me at least) value for which I should set upstream-cache if I only had to pick one

ipetkov avatar Oct 15 '23 20:10 ipetkov

Did some digging in the magic-nix-cache sources, looks like any new store paths get uploaded which does not take into account whether the upstream cache(s) also include it

https://github.com/DeterminateSystems/magic-nix-cache/blob/a2eb0c6759c08aa7b288708effccf9047a1bb525/magic-nix-cache/src/api.rs#L52-L57

ipetkov avatar Oct 15 '23 21:10 ipetkov