Instance Property
cacheDirectory
Optional separate path for cached consensus and descriptor files.
var cacheDirectory: String?
Mentioned In
Discussion
Maps to torrc CacheDirectory (tor.1.txt). When set, Tor stores cached-certs, cached-microdesc-consensus, and related files here instead of under dataDirectory, allowing the consensus cache to outlive an ephemeral data directory.
Important
The cache directory is never deleted by stop(), even when ownsDataDirectory is true. Manage its lifecycle at the application layer.