Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

binary-cache-store: add setting to disable local narinfo caching #2575

Closed
wants to merge 1 commit into from

Conversation

LnL7
Copy link
Member

@LnL7 LnL7 commented Dec 12, 2018

This is nice for debugging since the cache can have some unintended side
effects when, eg. paths are removed but not invalidated.

$ nix path-info --store 's3://test?cache=0' /nix/store/6j01qy6rj13q5nibm4gpmlv6x7sfgim8-foo
skipping local narinfo cache for 's3://test'
querying info about '/nix/store/6j01qy6rj13q5nibm4gpmlv6x7sfgim8-foo' on 's3://test'...
downloaded 's3://nix/6j01qy6rj13q5nibm4gpmlv6x7sfgim8.narinfo' (392 bytes) in 21 ms
querying foo on s3://nix
/nix/store/6j01qy6rj13q5nibm4gpmlv6x7sfgim8-foo

This is nice for debugging since the cache can have some unintended side
effects when, eg. paths are removed but not invalidated.
@@ -23,6 +23,8 @@ class HttpBinaryCacheStore : public BinaryCacheStore

public:

const Setting<bool> cache{this, true, "cache", "Whether to cache narinfo metadata for this binary cache."};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should probably move to src/libstore/binary-cache-store.hh ?

Also I guess this is useful per binary cache but it's possible to set something globally through --option narinfo-cache-{positive/negative}-ttl 0 that disables cache as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

narinfo caching doesn't make sense for file binary caches, but I could move it

@LnL7
Copy link
Member Author

LnL7 commented Apr 20, 2019

Guess this is not particularly useful, for debugging narinfo-cache-positive-ttl can be used.

@LnL7 LnL7 closed this Apr 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants