Uploading image to the same pathname and retrieving up to date image

Hello I store users avatar photos like this:
        const { data: updatedRecipe, error: updateError } = await supabaseAdmin
          .from('users_public')
          .update({
            id: user.id,
            avatar_url: `https://pnznokedxkdoassdldsp.supabase.co/storage/v1/object/public/user-content/${data1?.path}`,

The problem is that each time user updates profiel photo, I don't see the up to date photo on the client, I assume because of caching, even when I go to supabase dashboard the images are not updated, it takes couple of hours to see updated images on the client.

That is super confusing to users, so what can I do to avoid this, and make sure that I always show the most recent photos?

Is there such thing as invalidateCache method or something?
Was this page helpful?