diff options
Diffstat (limited to 'launcher/net')
-rw-r--r-- | launcher/net/HttpMetaCache.cpp | 12 | ||||
-rw-r--r-- | launcher/net/HttpMetaCache.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/launcher/net/HttpMetaCache.cpp b/launcher/net/HttpMetaCache.cpp index 9606ddb6..42198b71 100644 --- a/launcher/net/HttpMetaCache.cpp +++ b/launcher/net/HttpMetaCache.cpp @@ -162,6 +162,18 @@ auto HttpMetaCache::evictEntry(MetaEntryPtr entry) -> bool return true; } +void HttpMetaCache::evictAll() +{ + for (QString& base : m_entries.keys()) { + EntryMap& map = m_entries[base]; + qDebug() << "Evicting base" << base; + for (MetaEntryPtr entry : map.entry_list) { + if (!evictEntry(entry)) + qWarning() << "Unexpected missing cache entry" << entry->basePath; + } + } +} + auto HttpMetaCache::staleEntry(QString base, QString resource_path) -> MetaEntryPtr { auto foo = new MetaEntry(); diff --git a/launcher/net/HttpMetaCache.h b/launcher/net/HttpMetaCache.h index c0b12318..2a07d65a 100644 --- a/launcher/net/HttpMetaCache.h +++ b/launcher/net/HttpMetaCache.h @@ -113,6 +113,7 @@ class HttpMetaCache : public QObject { // evict selected entry from cache auto evictEntry(MetaEntryPtr entry) -> bool; + void evictAll(); void addBase(QString base, QString base_root); |