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