简体   繁体   English

本地缓存Amazon S3 Codeigniter

[英]locally cache amazon s3 codeigniter

I have just setup a photo gallery web app which links to my amazon s3 account i have bilt it in code ignitor. 我刚刚设置了一个照相馆Web应用程序,该应用程序链接到我的Amazon S3帐户,我已在代码点火器中将其设置为必填项。

Problem i am having that i am looking for a solution is! 问题是我正在寻找解决方案!

When i pulls the imagess from S3 some of them are 4-5mb which takes forever to load this is really frustrating and i am asking for advice on the best way to handle this. 当我从S3中提取图像时,其中一些是4-5mb,这将永远加载,这确实令人沮丧,我正在寻求有关处理此问题的最佳方法的建议。

Is their a way i can cache thumbnail images on the amazon s3 sever or is it best to cache the thumbnails locally on my server and then pull them from their. 是他们可以在Amazon S3服务器上缓存缩略图的一种方法,还是最好将缩略图本地缓存在我的服务器上,然后从它们中拉出它们。

Can someone recommend a really good library that i can use in conjunction with code ignitor and s3 to manage this. 有人可以推荐一个非常好的库,我可以将其与代码点火器和s3结合使用来管理此库。

Thanks 谢谢

To do this I would say upload your images to codeigniter and create some sort of thumbnail script using the in built Image Manipulation class from there you can upload the file to S3 using something like CloudManiac-Storage over at Codeigniter Sparks . 为此,我想说的是,将图像上传到Codeigniter并使用内置的Image Manipulation类创建某种缩略图脚本,您可以在Codeigniter Sparks使用CloudManiac-Storage之 的文件将文件上传到S3。

From your description the slowness is only being caused by the long load times on the images, so an upload and thumbnail creation tool is just what you need. 从您的描述来看,缓慢的原因仅在于图像上的加载时间长,因此您只需要一个上传和缩略图创建工具。 As far as I am aware S3 does not come with any sort of built in tool useful for this. 据我所知,S3没有附带任何有用的内置工具。

With regards to your question on where is best to cache, S3 is likely to be faster (depending on your hosting setup), however it may cost more. 关于您最好缓存在哪里的问题,S3可能会更快(取决于您的主机设置),但是可能会花费更多。 Experiment, work out the costs and see what works best for you personally. 进行实验,算出成本,然后看看哪种方法最适合您。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM