From ab0c4877783328a69991297b7048e285d9590e4f Mon Sep 17 00:00:00 2001 From: Zed Date: Wed, 5 Jan 2022 21:15:13 +0100 Subject: [PATCH] Fix gallery caching to prevent redundant requests --- 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 8e8f529..e0133d2 100644 --- a/src/redis_cache.nim +++ b/src/redis_cache.nim @@ -73,7 +73,7 @@ proc cache*(data: List) {.async.} = await setex(data.listKey, listCacheTime, compress(toFlatty(data))) proc cache*(data: PhotoRail; name: string) {.async.} = - await setex("pr:" & name, baseCacheTime, compress(toFlatty(data))) + await setex("pr:" & toLower(name), baseCacheTime, compress(toFlatty(data))) proc cache*(data: Profile) {.async.} = if data.username.len == 0 or data.id.len == 0: return