| 321 | } |
| 322 | |
| 323 | void AddressBookFilesystemStorage::CleanUpCache () |
| 324 | { |
| 325 | auto ts = i2p::util::GetMonotonicSeconds (); |
| 326 | std::lock_guard<std::mutex> l(m_FullAddressCacheMutex); |
| 327 | for (auto it = m_FullAddressCache.begin (); it != m_FullAddressCache.end ();) |
| 328 | { |
| 329 | if (ts > it->second.second + ADDRESS_CACHE_EXPIRATION_TIMEOUT) |
| 330 | it = m_FullAddressCache.erase (it); |
| 331 | else |
| 332 | it++; |
| 333 | } |
| 334 | } |
| 335 | |
| 336 | //--------------------------------------------------------------------- |
| 337 |
no test coverage detected