feat: cache character colors for unchanged character

This commit is contained in:
DIYgod 2023-07-26 18:46:41 +01:00
parent 4a3dea2967
commit 5f4a87783a
No known key found for this signature in database
2 changed files with 4 additions and 2 deletions

View File

@ -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]
}

View File

@ -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 = {}