Skip to content

Commit

Permalink
Fix gallery caching to prevent redundant requests
Browse files Browse the repository at this point in the history
  • Loading branch information
zedeus committed Jan 5, 2022
1 parent 18cf95e commit ab0c487
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/redis_cache.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ab0c487

Please sign in to comment.