@Sid | R2 @omar RE: https://discord.com/channels/595317990191398933/940663374377783388/11672540466

@Sid | R2 @omar

RE: r2

Here's what I ended up doing. When the user changes their profile photo, I update a field in my database called profile_changed.

Then, in my handler if that photo is requested again, I check to see if it's more than 15 minutes since the last profile change. If it is less than 15 minutes, I use a refreshed string to fetch the photo Insert the newest version of the photo. Otherwise, I use whatever is in cache right now. I hope that is the most recent photo.

Sid, how long is a dynamically generated image pulled from r2 lifespan? Do I need to bump this up to an even higher time.? Like a day?
Was this page helpful?