From eb233e728f06ec2b5cbcfc85059fa91a1150f291 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 25 Aug 2004 16:54:08 +0000 Subject: * `--min-age' flag in nix-store and nix-collect-garbage to only delete unreachable paths that haven't been used for N hours. For instance, `nix-collect-garbage --min-age 168' only deletes paths that haven't been accessed in the last week. This is useful for instance in the build farm where many derivations can be shared between consecutive builds, and we wouldn't want a garbage collect to throw them all away. We could of course register them as roots, but then we'd to unregister them at some point, which would be a pain to manage. The `--min-age' flag gives us a sort of MRU caching scheme. BUG: this really shouldn't be in gc.cc since that violates mechanism/policy separation. --- doc/manual/nix-collect-garbage.xml | 11 +++++++++++ doc/manual/nix-store.xml | 12 ++++++++++++ 2 files changed, 23 insertions(+) (limited to 'doc') diff --git a/doc/manual/nix-collect-garbage.xml b/doc/manual/nix-collect-garbage.xml index adc6c1e730a7..1de50408e01e 100644 --- a/doc/manual/nix-collect-garbage.xml +++ b/doc/manual/nix-collect-garbage.xml @@ -11,6 +11,7 @@ + age @@ -56,6 +57,16 @@ + + age + + + This option corresponds to the + option in nix-store . + + + + diff --git a/doc/manual/nix-store.xml b/doc/manual/nix-store.xml index febe02fd4ada..522de60d3696 100644 --- a/doc/manual/nix-store.xml +++ b/doc/manual/nix-store.xml @@ -147,6 +147,7 @@ + age @@ -207,6 +208,17 @@ Each line should contain exactly one store path. + + The option specifies a minimum time + in hours that an unreachable store path must not have been + used before it is considered dead. The default is 0 (consider + all unreachable store paths dead). Whether a store path has + been used is determined by looking at its access time + (atime), so this does not work if the store + is located on a file system that has the + noatime option set. + + You generally will want to use the command -- cgit 1.4.1