I have a few Node.js repositories on my computer which I back up daily. In order to have tar
exclude the dependencies, I have to place a CACHEDIR.TAG file in each node_modules
directory.
The problem is that every time npm install
runs it deletes those files. So it was necessary to complicate my script with a pre-backup hook that writes a new tag into each directory.
Today I’m playing around with Rust for the first time. I ran cargo build
and looked inside the target
folder and saw a CACHEDIR.TAG
. I couldn’t believe my eyes–it takes care of that by default! This is literally the first time I’ve seen this implemented in anything.
I didn’t know about CACHEDIR.TAG, that’s good to know. And yes, Rust tooling is stellar.