Type Alias libp2p_kad::KademliaCaching
source · pub type KademliaCaching = Caching;
👎Deprecated: Import the
kad
module instead and refer to this type as kad::Caching
.Aliased Type§
enum KademliaCaching {
Disabled,
Enabled {
max_peers: u16,
},
}
Variants§
Disabled
Caching is disabled and the peers closest to records being looked up
that do not return a record are not tracked, i.e.
GetRecordOk::FinishedWithNoAdditionalRecord
is always empty.
Enabled
Up to max_peers
peers not returning a record that are closest to the key
being looked up are tracked and returned in GetRecordOk::FinishedWithNoAdditionalRecord
.
The write-back operation must be performed explicitly, if
desired and after choosing a record from the results, via Behaviour::put_record_to
.