zig icon indicating copy to clipboard operation
zig copied to clipboard

Feature: Add CACHEDIR.TAG to zig-cache

Open Ciantic opened this issue 4 years ago • 6 comments

Consider adding CACHEDIR.TAG to zig-cache directory.

It's just text file with ASCII text at the beginning:

Signature: 8a477f597d28d172789f06886806bc55

(The hexadecimal string is same on all CACHEDIR.TAG files.)

For example Rust does this, and plenty other things, it makes easier for backup tools to ignore the directory.

Ciantic avatar Mar 11 '21 19:03 Ciantic

Do you have examples of tools that use CACHEDIR.TAG? this is the first I've heard of it.

daurnimator avatar Mar 12 '21 03:03 daurnimator

Cargo uses it. image

g-w1 avatar Mar 12 '21 03:03 g-w1

Do you have examples of tools that use CACHEDIR.TAG? this is the first I've heard of it.

from gnutar docs:

       --exclude-caches
              exclude contents of directories containing CACHEDIR.TAG, except for the tag file itself

       --exclude-caches-all
              exclude directories containing CACHEDIR.TAG

       --exclude-caches-under exclude everything under directories containing
              CACHEDIR.TAG

mikdusan avatar Mar 12 '21 08:03 mikdusan

Kopia (my preferred backup tool at the moment) uses it by default

Ciantic avatar Mar 12 '21 10:03 Ciantic

Do you have examples of tools that use CACHEDIR.TAG? this is the first I've heard of it.

Restic and fontconfig supports it. I also opened an issue for rsync.

perillo avatar Mar 10 '23 11:03 perillo

What about adding CACHEDIR.TAG to the zig-out directory, too?

perillo avatar Mar 10 '23 11:03 perillo