MCPcopy Create free account
hub / github.com/ElyPrismLauncher/Launcher / evictAll

Method evictAll

launcher/net/HttpMetaCache.cpp:173–188  ·  view source on GitHub ↗

returns true on success, false otherwise

Source from the content-addressed store, hash-verified

171
172// returns true on success, false otherwise
173auto 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
190auto HttpMetaCache::staleEntry(QString base, QString resource_path) -> MetaEntryPtr
191{

Callers 2

finishedMethod · 0.80

Calls 2

deletePathFunction · 0.85
clearMethod · 0.45

Tested by

no test coverage detected