Img is downloaded for multi times?

I use webrick and mongrel to test the rails application,I found that the
same image will be downloaded for multi times:

There are multi article items to be displayed,each of which will include
the according article title and the default article image.Suppose there
are 10 article items to be displayed,although each of the item’s default
image is same,I see in the console of webrick and mongrel that the image
has been downloaded for 10 times, I had thought that since the image is
the same,then 9 of others will re-use the downloaded one,but all of them
are downloaded, will this happen when the web application is deployed
under apache or lighty? Or is there some method to prevent such a
situation?

Hi Andy,

Andy wrote:

I use webrick and mongrel to test the rails application,
I found that the same image will be downloaded for
multi times:

In the development/test environments, Rails turns off all caching. You
can
change the behavior in development.rb and/or test.rb in the
config/environments directory.

hth,
Bill

Bill W. wrote:

In the development/test environments, Rails turns off all caching. You
can
change the behavior in development.rb and/or test.rb in the
config/environments directory.

hth,
Bill

Hi,Bill,I got it,thank you very much!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs