Expand description
Content Routing Cache — multi-tier DHT routing cache.
Stores provider records, routing hints, and negative cache entries to reduce DHT lookup latency. Organises data into three independent tiers with configurable per-tier TTLs, per-CID provider limits, and global capacity caps with oldest-CID eviction.
Structs§
- Cache
Config - Configuration for
ContentRoutingCache. - Cache
Stats - Snapshot of cache statistics.
- Content
Routing Cache - Multi-tier cache for DHT content routing.
- CrcProvider
Record - A single provider record: which peer provides a given CID.
- Negative
Cache Entry - Negative-cache entry: CID was looked up and not found.
- Routing
Hint - Cached routing hint: the nearest peers known for a CID.
Constants§
- DEFAULT_
HINT_ TTL_ MS - Default routing-hint TTL: 5 minutes in milliseconds.
- DEFAULT_
MAX_ HINTS - Default routing-hint cache capacity (number of distinct CIDs).
- DEFAULT_
MAX_ NEGATIVE - Default negative cache capacity (number of distinct CIDs).
- DEFAULT_
MAX_ PROVIDERS - Default provider cache capacity (number of distinct CIDs).
- DEFAULT_
NEGATIVE_ TTL_ MS - Default negative-entry TTL: 1 minute in milliseconds.
- DEFAULT_
PROVIDER_ TTL_ MS - Default provider record TTL: 1 hour in milliseconds.