Forum: Ruby on Rails [RAILS] Caching photo by URL

9e65ee1829ac2024897595474a27adaf?d=identicon&s=25 Everett (Guest)
on 2012-08-16 13:43
(Received via mailing list)
Hye everybody !

I try to caching some pictures, to speed accrease my web site !
I have a def which a array of url in an helper and in the view just a
loop
by .each on the return of for display a html <img src= myvar>
If you have any idea to suggest i'm really open I have try to follow
this
http://code.coneybeare.net/make-your-own-cache-sys...

Thanks all !
5f94b9b346c2aa648a80bc259978e5bc?d=identicon&s=25 Colin Law (Guest)
on 2012-08-16 21:59
(Received via mailing list)
On 16 August 2012 11:38, Everett <themsamus@gmail.com> wrote:
> Hye everybody !
>
> I try to caching some pictures, to speed accrease my web site !
> I have a def which a array of url in an helper and in the view just a loop
> by .each on the return of for display a html <img src= myvar>
> If you have any idea to suggest i'm really open I have try to follow this
> http://code.coneybeare.net/make-your-own-cache-sys...

I think you need to explain your problem more fully.  Are you using
Amazon's webservers as in the link you posted to?   Exactly what
problem are you trying to solve by caching, and what are you trying to
cache and where to you want to cache it?

Colin
9e65ee1829ac2024897595474a27adaf?d=identicon&s=25 Everett (Guest)
on 2012-08-17 12:24
(Received via mailing list)
Hye Colin !
Firstly thank you for your answer !
I try to caching my pictures on my app serv on the public folder of my
rails app, i'll create a sub folder cache.{id-user}
I launch a function which return me a array of url, like that
"http://www.bytebob.com/images/ruby.png"
and in my view I do a loop by .each, and for every occured, it puts <img
src="{url}">
So it make some time to get url, and I want caching the .png/.jpg/...
file,
like a thumbnail, on a folder to increase speed
Like that it'll take some time just one time, when user connect !

I use RAILS 3 + Devise + Mongoid

Sorry for my English ! =S

Le jeudi 16 aot 2012 21:57:59 UTC+2, Colin Law a crit :
5f94b9b346c2aa648a80bc259978e5bc?d=identicon&s=25 Colin Law (Guest)
on 2012-08-17 17:25
(Received via mailing list)
On 17 August 2012 11:23, Everett <themsamus@gmail.com> wrote:
> Like that it'll take some time just one time, when user connect !
I don't understand why cacheing the images will make it quicker.
Where are they coming from in the first place?

Also could you please not top post, it makes it difficult to follow
the thread.  Insert you reply at appropriate places in previous
messages, thanks.

Colin
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.