MCPcopy Create free account
hub / github.com/Tencent/phxqueue / PutAddrToCache

Method PutAddrToCache

phxqueue/comm/masterclient.cpp:33–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31
32
33void MasterClientBase::PutAddrToCache(const std::string &key, const proto::Addr &addr) {
34 addr_cache_[key] = make_pair(addr, time(nullptr) + 3600 + utils::OtherUtils::FastRand() % 1800);
35}
36
37bool MasterClientBase::GetAddrFromCache(const std::string &key, proto::Addr &addr) {
38 auto &&it(addr_cache_.find(key));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected