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

tarball-ttl: document #2882

Merged
merged 1 commit into from Jul 5, 2019

Conversation

@grahamc
Copy link
Member

commented May 22, 2019

Closes #1115

@teto

This comment has been minimized.

Copy link
Contributor

commented May 22, 2019

would a mention to fetchGit / fetchurl be too detailed ?

@grahamc

This comment has been minimized.

Copy link
Member Author

commented May 22, 2019

No I don't think so, can you help me out by writing a few sentences about that?


<listitem>
<para>The number of seconds tarballs in
<filename>~/.cache/nix/tarballs</filename> are considered fresh.

This comment has been minimized.

Copy link
@teto

teto May 22, 2019

Contributor

$XDG_CACHE_HOME ?

@teto

This comment has been minimized.

Copy link
Contributor

commented May 22, 2019

as I essentially use it to refresh freshly pushed fixup commits, I would advance sthg like:
Timeout that triggers builtins.fetchGit to refetch data.

@grahamc grahamc force-pushed the grahamc:docs/1115-tarball-ttl branch from d8c9c27 to 4d02e87 Jul 3, 2019

<para>Setting the TTL to <literal>0</literal> forces Nix to check
if the tarball is up to date by ETag if the remote server supports
it.</para>

This comment has been minimized.

Copy link
@edolstra

edolstra Jul 5, 2019

Member

This suggests that ETag is only used if TTL=0, but it's always used if supplied by the server.

This comment has been minimized.

Copy link
@grahamc

grahamc Jul 5, 2019

Author Member

This is complicated :)


<para>The number of seconds a download is cached in
<filename>$XDG_CACHE_HOME/nix/tarballs</filename>
are considered fresh.

This comment has been minimized.

Copy link
@edolstra

edolstra Jul 5, 2019

Member

is cached in ... are considered fresh -> ... is considered fresh. And maybe add something like "If a cached tarball is older, Nix will check whether it is still up to date using its ETag header, and if not, download the latest version."

@grahamc grahamc force-pushed the grahamc:docs/1115-tarball-ttl branch 2 times, most recently from b7940b0 to 1ae6043 Jul 5, 2019
@grahamc

This comment has been minimized.

Copy link
Member Author

commented Jul 5, 2019

Updated!

@@ -347,7 +347,7 @@ stdenv.mkDerivation { … }
You can change the cache timeout either on the command line with
<option>--option tarball-ttl <replaceable>number of seconds</replaceable></option> or
in the Nix configuration file with this option:
<literal>tarball-ttl <replaceable>number of seconds to cache</replaceable></literal>.
<literal><xref linkend="conf-tarball-ttl" /> <replaceable>number of seconds to cache</replaceable></literal>.

This comment has been minimized.

Copy link
@edolstra

edolstra Jul 5, 2019

Member

Hm, what does this render as?

This comment has been minimized.

Copy link
@grahamc

grahamc Jul 5, 2019

Author Member

Screenshot_2019-07-05 Nix Package Manager Guide

It becomes a link, but (at least, locally) doesn't show a special indication that it is clickable. The term is automatically selected as the link text.

@grahamc grahamc force-pushed the grahamc:docs/1115-tarball-ttl branch from 1ae6043 to 16485fe Jul 5, 2019
Incorporates text from Niklas Hambüchen in #2978

Closes #1115
@grahamc grahamc force-pushed the grahamc:docs/1115-tarball-ttl branch from 16485fe to 648bdf1 Jul 5, 2019
@edolstra edolstra merged commit b5ae85f into NixOS:master Jul 5, 2019
@grahamc grahamc deleted the grahamc:docs/1115-tarball-ttl branch Jul 5, 2019
@teto

This comment has been minimized.

Copy link
Contributor

commented Jul 6, 2019

thanks ! happy to see one of the few settings I use documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.