pub struct CacheConfig {
pub path: Option<String>,
pub cmn_ttl_s: u64,
pub key_trust_ttl_s: u64,
pub key_trust_refresh_mode: KeyTrustRefreshMode,
pub key_trust_synapse_witness_mode: SynapseWitnessMode,
pub max_download_bytes: u64,
pub max_extract_bytes: u64,
pub max_extract_files: u64,
pub max_extract_file_bytes: u64,
pub clock_skew_tolerance_s: u64,
pub require_domain_first_key: bool,
}Fields§
§path: Option<String>Custom cache directory path (default: $CMN_HOME/hypha/cache/)
cmn_ttl_s: u64cmn.json cache TTL in seconds (default: 300 = 5 minutes)
key_trust_ttl_s: u64Key trust cache TTL in seconds (default: 604800 = 7 days)
key_trust_refresh_mode: KeyTrustRefreshModeKey trust refresh strategy (default: expired)
key_trust_synapse_witness_mode: SynapseWitnessModeKey trust fallback policy when domain is unreachable (default: allow)
max_download_bytes: u64Maximum HTTP response body size in bytes (default: 1 GB)
max_extract_bytes: u64Maximum total bytes to extract from an archive (default: 512 MB)
max_extract_files: u64Maximum number of files to extract from an archive (default: 100_000)
max_extract_file_bytes: u64Maximum size of a single file in an archive in bytes (default: 256 MB)
clock_skew_tolerance_s: u64Clock skew tolerance in seconds for key trust TTL checks (default: 300 = 5 minutes). Adds a grace period to prevent false “key_untrusted” errors caused by clock drift between the local machine and the publishing domain.
require_domain_first_key: boolWhether the initial key for a domain must come from the domain itself (TOFU). true = more secure, first contact requires domain to be online. false = allows synapse to provide initial key (less secure).