From d4109938fe254aab9c37db5ba942482d365c4977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Mon, 13 Jun 2016 21:53:56 +0200 Subject: [PATCH] NOISSUE implement 'always-stale' cache entries --- api/logic/minecraft/Library.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/logic/minecraft/Library.cpp b/api/logic/minecraft/Library.cpp index 584c7ac5..c516edb7 100644 --- a/api/logic/minecraft/Library.cpp +++ b/api/logic/minecraft/Library.cpp @@ -72,12 +72,17 @@ void Library::getApplicableFiles(OpSys system, QStringList& jar, QStringList& na QList Library::getDownloads(OpSys system, HttpMetaCache * cache, QStringList &failedFiles) const { QList out; + bool isAlwaysStale = (hint() == "always-stale"); bool isLocal = (hint() == "local"); bool isForge = (hint() == "forge-pack-xz"); auto add_download = [&](QString storage, QString url, QString sha1 = QString()) { auto entry = cache->resolveEntry("libraries", storage); + if(isAlwaysStale) + { + entry->setStale(true); + } if (!entry->isStale()) return true; if(isLocal)