NOISSUE implement 'always-stale' cache entries
This commit is contained in:
parent
56394f93e5
commit
d4109938fe
@ -72,12 +72,17 @@ void Library::getApplicableFiles(OpSys system, QStringList& jar, QStringList& na
|
|||||||
QList<NetActionPtr> Library::getDownloads(OpSys system, HttpMetaCache * cache, QStringList &failedFiles) const
|
QList<NetActionPtr> Library::getDownloads(OpSys system, HttpMetaCache * cache, QStringList &failedFiles) const
|
||||||
{
|
{
|
||||||
QList<NetActionPtr> out;
|
QList<NetActionPtr> out;
|
||||||
|
bool isAlwaysStale = (hint() == "always-stale");
|
||||||
bool isLocal = (hint() == "local");
|
bool isLocal = (hint() == "local");
|
||||||
bool isForge = (hint() == "forge-pack-xz");
|
bool isForge = (hint() == "forge-pack-xz");
|
||||||
|
|
||||||
auto add_download = [&](QString storage, QString url, QString sha1 = QString())
|
auto add_download = [&](QString storage, QString url, QString sha1 = QString())
|
||||||
{
|
{
|
||||||
auto entry = cache->resolveEntry("libraries", storage);
|
auto entry = cache->resolveEntry("libraries", storage);
|
||||||
|
if(isAlwaysStale)
|
||||||
|
{
|
||||||
|
entry->setStale(true);
|
||||||
|
}
|
||||||
if (!entry->isStale())
|
if (!entry->isStale())
|
||||||
return true;
|
return true;
|
||||||
if(isLocal)
|
if(isLocal)
|
||||||
|
Loading…
Reference in New Issue
Block a user