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

Method updateEntry

launcher/net/HttpMetaCache.cpp:144–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144auto HttpMetaCache::updateEntry(MetaEntryPtr stale_entry) -> bool
145{
146 if (!m_entries.contains(stale_entry->m_baseId)) {
147 qCCritical(taskHttpMetaCacheLogC) << "Cannot add entry with unknown base:" << stale_entry->m_baseId.toLocal8Bit();
148 return false;
149 }
150
151 if (stale_entry->m_stale) {
152 qCCritical(taskHttpMetaCacheLogC) << "Cannot add stale entry:" << stale_entry->getFullPath().toLocal8Bit();
153 return false;
154 }
155
156 m_entries[stale_entry->m_baseId].entry_list[stale_entry->m_relativePath] = stale_entry;
157 SaveEventually();
158
159 return true;
160}
161
162auto HttpMetaCache::evictEntry(MetaEntryPtr entry) -> bool
163{

Callers 1

finalizeCacheMethod · 0.80

Calls 2

getFullPathMethod · 0.80
containsMethod · 0.45

Tested by

no test coverage detected