From 5f4a87783a5d2fcf631bb04aa6975addfdcd070a Mon Sep 17 00:00:00 2001 From: DIYgod Date: Wed, 26 Jul 2023 18:46:41 +0100 Subject: [PATCH] feat: cache character colors for unchanged character --- data/filter.json | 2 +- src/queries/site.server.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/data/filter.json b/data/filter.json index 3e93621a..af53b9e5 100644 --- a/data/filter.json +++ b/data/filter.json @@ -1,7 +1,7 @@ { "latest": [ 151, 53994, 54570, 54481, 54537, 54302, 53944, 55768, 55855, 56592, 54986, - 56875, 56873, 56666, 55996, 57407 + 56875, 56873, 56666, 55996, 57407, 56249 ], "comment": [54986] } diff --git a/src/queries/site.server.ts b/src/queries/site.server.ts index 83c7f070..970368c4 100644 --- a/src/queries/site.server.ts +++ b/src/queries/site.server.ts @@ -135,12 +135,14 @@ export const getNFTs = async (address?: string) => { } export const getCharacterColors = async (character?: ExpandedCharacter) => { - const key = ["getThemeColors", character?.handle] + const key = ["getThemeColors", character?.metadata?.uri] if (!character) { return null } return cacheGet({ key, + noExpire: true, + noUpdate: true, getValueFun: async () => { let colors = {}