refs #659 Cache value with timestamp of 0 should still be loadable.

This commit is contained in:
Mathew Sutcliffe
2016-05-30 20:31:29 +01:00
parent 8377ab2e51
commit 0bb17414ac

View File

@@ -347,7 +347,7 @@ namespace BlackMisc
auto newTimestamps = fromJson(json.value("timestamps").toObject());
for (auto it = newTimestamps.cbegin(); it != newTimestamps.cend(); ++it)
{
auto current = timestamps.value(it.key(), 0);
auto current = timestamps.value(it.key(), -1);
auto ttl = timesToLive.value(it.key(), -1);
if (current < it.value() && (ttl < 0 || QDateTime::currentMSecsSinceEpoch() < it.value() + ttl))
{