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 spore_max_download_bytes: u64,
pub spore_max_extract_bytes: u64,
pub spore_max_extract_files: u64,
pub spore_max_extract_file_bytes: u64,
pub spore_reject_path_components: Vec<String>,
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)
spore_max_download_bytes: u64Maximum spore archive HTTP response body size in bytes (default: 1 GB)
spore_max_extract_bytes: u64Maximum total bytes to extract from a spore archive (default: 512 MB)
spore_max_extract_files: u64Maximum number of files to extract from a spore archive (default: 100_000)
spore_max_extract_file_bytes: u64Maximum size of a single file in a spore archive in bytes (default: 256 MB)
spore_reject_path_components: Vec<String>Path components rejected when receiving spore content.
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).