How can i cache object in storage?

In my laravel application I am using linode storage for image storage. Is it possible to cache images?

3 Replies

Are your images public?

I do the same with a Laravel app, images are uploaded with the “public-read” ACL, then the app renders the Object Storage public URL to the image.

That way image requests don’t hit my app, take advantage of any caching employed by Linode, and don’t have an extra round trip (“request to my app —> request to Object Storage —> transfer image back“ becomes “request to Object Storage —> transfer image back”)

The app is https://photos.andysh.uk

Yes, Images are public. Which caching you are using?

I don’t, that’s my point. If you link out to the object storage URL in your < img > tag, the request for the image won’t even hit your Linode.

I’m pretty sure the Object Storage clusters have plenty of caching plus raw hardware to cope with high-request usage patterns.

If any of the Linode team are reading this, I’d be intrigued to know what kind/how much hardware does sit behind an object storage cluster.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct