Merge pull request #1080 from flowln/eternal_cache
Never invalidate libraries cache entries by time elapsed
This commit is contained in:
@ -88,6 +88,9 @@ QList<NetAction::Ptr> Library::getDownloads(
|
||||
options |= Net::Download::Option::AcceptLocalFiles;
|
||||
}
|
||||
|
||||
// Don't add a time limit for the libraries cache entry validity
|
||||
options |= Net::Download::Option::MakeEternal;
|
||||
|
||||
if(sha1.size())
|
||||
{
|
||||
auto rawSha1 = QByteArray::fromHex(sha1.toLatin1());
|
||||
|
@ -63,11 +63,12 @@ void FMLLibrariesTask::executeTask()
|
||||
setStatus(tr("Downloading FML libraries..."));
|
||||
auto dljob = new NetJob("FML libraries", APPLICATION->network());
|
||||
auto metacache = APPLICATION->metacache();
|
||||
Net::Download::Options options = Net::Download::Option::MakeEternal;
|
||||
for (auto &lib : fmlLibsToProcess)
|
||||
{
|
||||
auto entry = metacache->resolveEntry("fmllibs", lib.filename);
|
||||
QString urlString = BuildConfig.FMLLIBS_BASE_URL + lib.filename;
|
||||
dljob->addNetAction(Net::Download::makeCached(QUrl(urlString), entry));
|
||||
dljob->addNetAction(Net::Download::makeCached(QUrl(urlString), entry, options));
|
||||
}
|
||||
|
||||
connect(dljob, &NetJob::succeeded, this, &FMLLibrariesTask::fmllibsFinished);
|
||||
|
Reference in New Issue
Block a user