stamp-labs / stamp

Avatars for web3
https://stamp.fyi
MIT License
83 stars 21 forks source link

Space image cache is wrong #119

Closed ChaituVR closed 1 month ago

ChaituVR commented 11 months ago

In some cases, even if we pass new cb param, the image stored in cache is old avatar

Example https://cdn.stamp.fyi/space/wen🌕.eth?s=96&cb=c178562f8f12066b here is this case c178562f8f12066b belong to new image hash but somehow in cache we still have old image

i may delete the cache soon so for future reference:

when i visit link above, I see this image

if i change cb to something else it works image

On UI cb is generated with const hash = sha256(props.space.avatar).slice(0, 16); while props.space.avatar value is ipfs://bafybeiatkvzda3w6xquzv2dkn5gn7f3jrfarxh6bwy5t3lid2hut5qooie

Sekhmet commented 3 months ago

Do we have some more recent example of broken cache? The one in the task no longer works.

wa0x6e commented 3 months ago

I’ve never been able to reproduce the issue.

My take on solving this was to refactor the code, to extract the cache engine

Sekhmet commented 3 months ago

We had bug that could cause it, but it should have been solved before this issue was created so I'm not sure: https://github.com/stamp-labs/stamp/pull/55

Ideally we should have repro so we can see if what we do actually fixes it, without it I don't think I'd bother.

Sekhmet commented 1 month ago

We can reopen if we reproduce it.