From 548cb62ff2ed73157c5be13fd6c1198b2aa73030 Mon Sep 17 00:00:00 2001 From: Zed Date: Tue, 2 Jun 2020 22:15:04 +0200 Subject: [PATCH] Fix very strange cache bug This happened once and I have no idea why, but it shouldn't cause a crash. --- src/redis_cache.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redis_cache.nim b/src/redis_cache.nim index d1b8f21..3910375 100644 --- a/src/redis_cache.nim +++ b/src/redis_cache.nim @@ -115,4 +115,4 @@ proc getCachedRss*(key: string): Future[(string, string)] {.async.} = res = await r.hgetall("rss:" & key) if "rss" in res: - result = (res["rss"], res["min"]) + result = (res["rss"], res.getOrDefault("min"))