| 82 | } |
| 83 | |
| 84 | bool HasExpiredDict(const CacheEntry& cached) { |
| 85 | if (cached.tables.expired()) { |
| 86 | return true; |
| 87 | } |
| 88 | for (const std::weak_ptr<const Dict>& dict : cached.dicts) { |
| 89 | if (dict.expired()) { |
| 90 | return true; |
| 91 | } |
| 92 | } |
| 93 | return false; |
| 94 | } |
| 95 | |
| 96 | void PruneExpiredPrefixMatchCache( |
| 97 | std::unordered_map<std::string, std::vector<CacheEntry>>* cache) { |
no outgoing calls
no test coverage detected