Opened 12 months ago

Last modified 12 months ago

#32354 new enhancement

Support "Cache Directory Tagging Standard" (already implemented e.g. in GNU tar)

Reported by: rm Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


Tor seems to store sizable cached data in /var/lib/tor/diff-cache/. There is now a standard for apps to indicate that transient caches like this to be skipped from backups:

The application needs to create (and recreate) a file called "CACHEDIR.TAG" in the cache directory, with content of "Signature: 8a477f597d28d172789f06886806bc55".

Skipping cache directories marked as such via this standard is already supported for example in GNU tar:


Exclude contents of directories containing file CACHEDIR.TAG, except for the tag file itself.


Exclude directories containing file CACHEDIR.TAG and the file itself.


Exclude everything under directories containing CACHEDIR.TAG

Child Tickets

Change History (3)

comment:1 Changed 12 months ago by rm

Also perhaps move /var/lib/tor/cached-* into their own dir marked like this as well.

comment:2 Changed 12 months ago by nickm

Milestone: Tor: unspecified

Also perhaps move /var/lib/tor/cached-* into their own dir marked like this as well.

For this, see the CacheDirectory option.

comment:3 Changed 12 months ago by rm

Oh and currently it will also actively fight the user trying to manually add such file:

Nov 06 09:43:10.000 [warn] Found misformatted file "CACHEDIR.TAG" in consensus cache; removing it.

Note: See TracTickets for help on using tickets.