Webserver memory caching

Is there a way to get a web server to use memory caching, but in a way
that plays well with Rails caching?

Apache has memory caching (mod_mem_cache), as I understand.... but we
cannot use it because Rails sweepers cannot expire cached pages?

The reason I ask -- for all the talk about how fast Lighttpd is, it's
not preferable to have a web server reading files off disk with every
request? Or have I missed something?

I guess the ideal setup would involve something like Memcached.
Somehow, the webserver would keep the most popular static items in
Memcached. Anything not found in Memcached can be found in /public on
disk. ActionController would expire items in Memcached as well as on
the disk.

Something like this would give worthwhile performance boosts?


When you use fcgi/mongrel, you have a persistent rails process. Which
in production mode, by default, caches all the modules.