diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-10-18 15:25:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-18 15:25:56 +0200 |
commit | 98963d4cdf94b173c68bb7c67feb68f6a73d4495 (patch) | |
tree | 53d2bd39bf584874736394db4bca2d99652a52b5 /launcher/net/HttpMetaCache.cpp | |
parent | 804ef36b203e7346ba9cf8496ee1aae26d3a5f18 (diff) | |
parent | 71f3c6b461eb296a3d1604e3534c9a4ab3d43397 (diff) | |
download | PrismLauncher-98963d4cdf94b173c68bb7c67feb68f6a73d4495.tar.gz PrismLauncher-98963d4cdf94b173c68bb7c67feb68f6a73d4495.tar.bz2 PrismLauncher-98963d4cdf94b173c68bb7c67feb68f6a73d4495.zip |
Merge pull request #29 from Scrumplex/feat-clear-metadata
Diffstat (limited to 'launcher/net/HttpMetaCache.cpp')
-rw-r--r-- | launcher/net/HttpMetaCache.cpp | 12 |
1 files changed, 12 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(); |