Goldspike static files caching

Hi there,

What would be the best approach for caching static files on let’s say
tomcat?

Stefan

Bekk Open Source
http://boss.bekk.no


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

If you’re dealing with a very high volume site there might be a benefit
in putting Squid in front of Tomcat as a caching proxy for static
content. However it’s likely to give small gains, so I wouldn’t really
go there unless I had already had a pretty good go at optimizing the
environment.

It’s the dynamic content which usually yields the biggest gains, and
Ruby on Rails has support that can be enabled for caching these files.

Cheers,
Robert

Stefan Magnus Landrø wrote:

Hi there,

What would be the best approach for caching static files on let’s say tomcat?

Stefan


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Hi there,

I’ve been thinking a little more about this in the last few days.

Wouldn’t it make sense to add a caching servlet filter in web.xml? I
believe caching in ‘native java’ is way faster than caching in rails.
Also, Aslak Hellesøy mentioned that whenever you have a Apache reverse
proxy in front of your app, it makes sense to map apaches document
root to your app’s public folder. This way, apache will take care of
serving your static content.

Cheers,

Stefan

2007/10/13, Robert E. [email protected]:

Robert
To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email


Bekk Open Source
http://boss.bekk.no


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Rails caching creates a static file in the public folder, which is
subsequently served directly by FileServlet or the application server
(depending on the configuration), either way it’s completely in Java
code. It should be able to serve the files very quickly.

A caching servlet filter would be able to store the file completely in
memory, however reading a small file is usually quick, and under heavy
load the OS should end up caching it anyway.

Cheers,
Robert

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