feat: add eternal cache entries
Those are entries that don't get stale over time, so we don't invalidate them if they 'expire'. Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
parent
2dcff83be7
commit
6be59b53f1
6 changed files with 31 additions and 11 deletions
|
@ -60,7 +60,7 @@ auto Download::makeCached(QUrl url, MetaEntryPtr entry, Options options) -> Down
|
|||
dl->m_url = url;
|
||||
dl->m_options = options;
|
||||
auto md5Node = new ChecksumValidator(QCryptographicHash::Md5);
|
||||
auto cachedNode = new MetaCacheSink(entry, md5Node);
|
||||
auto cachedNode = new MetaCacheSink(entry, md5Node, options.testFlag(Option::MakeEternal));
|
||||
dl->m_sink.reset(cachedNode);
|
||||
return dl;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue