mirror of
https://github.com/libp2p/go-libp2p-peerstore.git
synced 2025-02-11 07:00:12 +08:00
The GC procedure consists of two tiers: lookahead and purge. The lookahead tier runs less frequently (default 12 hours) than the purge tier (default 5 minutes). A lookahead round traverses the entire store and picks entries that need to be visited in the current lookahead window, pinning those entries in a separate region in the KV store, indexed by the next visit timestamp. A purge round iterates over the lookahead window only, and refreshes the entries that require a visit. It removes them from the lookahead region unless the entry requires another visit within the current window. |
||
---|---|---|
.. | ||
addr_book.go | ||
cache.go | ||
ds_test.go | ||
keybook.go | ||
metadata.go | ||
peerstore.go |