rstrom1763 / Client-Photos

1 stars 1 forks source link

Cache the pre-signed urls in Redis #73

Open rstrom1763 opened 6 months ago

rstrom1763 commented 6 months ago

I have discovered that you can create browser caching headers with S3 to make browsers cache the images. I tried testing it out and it does not seem to work since the code is generating a new signed url for each image at every page load. If we cache the url we will not only save latency by not generating a new url, but the image will also be able to pulled from the broswer cache rather than from S3 every single time. This will also save on bandwidth out from AWS.