From a76ca3d60f04616e4b8189b40d48e1b09bd27394 Mon Sep 17 00:00:00 2001 From: Zed Date: Thu, 20 Jan 2022 02:22:32 +0100 Subject: [PATCH] Remove Redis pipelining --- src/redis_cache.nim | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/redis_cache.nim b/src/redis_cache.nim index fe622f9..f272d3e 100644 --- a/src/redis_cache.nim +++ b/src/redis_cache.nim @@ -83,11 +83,9 @@ proc cache*(data: Profile) {.async.} = if data.username.len == 0: return let name = toLower(data.username) pool.withAcquire(r): - r.startPipelining() dawait r.setEx(name.profileKey, baseCacheTime, compress(toFlatty(data))) if data.id.len > 0: dawait r.hSet(name.pidKey, name, data.id) - dawait r.flushPipeline() proc cacheProfileId(username, id: string) {.async.} = if username.len == 0 or id.len == 0: return @@ -98,11 +96,9 @@ proc cacheProfileId(username, id: string) {.async.} = proc cacheRss*(query: string; rss: Rss) {.async.} = let key = "rss:" & query pool.withAcquire(r): - r.startPipelining() dawait r.hSet(key, "rss", rss.feed) dawait r.hSet(key, "min", rss.cursor) dawait r.expire(key, rssCacheTime) - dawait r.flushPipeline() proc getProfileId*(username: string): Future[string] {.async.} = let name = toLower(username)