You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m using Glide to generate thumbnails, which are stored on S3 and then served via CloudFront. When Glide stores the image in S3, it doesn’t set a Cache-Control header, so CloudFront always serves thumbnails with no-cache.
Could Glide set the Cache-Control header when writing images to the “cache” disk? It seems the write() method call at…
…would need to pass the Cache-Control header as the third parameter so that it’s set against the image when being written to S3. This would then allow CloudFront to serve 304 Not Modified responses.
I’m using Glide to generate thumbnails, which are stored on S3 and then served via CloudFront. When Glide stores the image in S3, it doesn’t set a
Cache-Control
header, so CloudFront always serves thumbnails withno-cache
.Could Glide set the
Cache-Control
header when writing images to the “cache” disk? It seems thewrite()
method call at…glide/src/Server.php
Lines 526 to 529 in b976168
…would need to pass the
Cache-Control
header as the third parameter so that it’s set against the image when being written to S3. This would then allow CloudFront to serve304 Not Modified
responses.Example:
The
Cache-Control
header is added to thumbnails, but only in theoutputImage()
method and after the thumbnails file has been stored.The text was updated successfully, but these errors were encountered: