returns true on success, false otherwise
| 171 | |
| 172 | // returns true on success, false otherwise |
| 173 | auto HttpMetaCache::evictAll() -> bool |
| 174 | { |
| 175 | bool ret = true; |
| 176 | for (QString& base : m_entries.keys()) { |
| 177 | EntryMap& map = m_entries[base]; |
| 178 | qCDebug(taskHttpMetaCacheLogC) << "Evicting base" << base; |
| 179 | for (MetaEntryPtr entry : map.entry_list) { |
| 180 | if (!evictEntry(entry)) |
| 181 | qCWarning(taskHttpMetaCacheLogC) << "Unexpected missing cache entry" << entry->m_basePath; |
| 182 | } |
| 183 | map.entry_list.clear(); |
| 184 | // AND all return codes together so the result is true iff all runs of deletePath() are true |
| 185 | ret &= FS::deletePath(map.base_path); |
| 186 | } |
| 187 | return ret; |
| 188 | } |
| 189 | |
| 190 | auto HttpMetaCache::staleEntry(QString base, QString resource_path) -> MetaEntryPtr |
| 191 | { |
no test coverage detected