Action caching with multiple domains

Action caching with multiple domains I have recently setup some action caching in my Rails app and everything seems to be working fine. I am using file store pointing at /tmp/cache. The problem I am running into is that separate cache directories are being created for different domain names that point at the same server. For example mysite.com and www.mysite.com will have different cache directories. It seems like it should be easy to force these into a single cache directory. But I have not been able to puzzle this one out. Is there a config variable that can be set to override the url or is this best handled with mod_rewrite? I have played around with mod_rewrite in an effort to fix this issue, with no results to this point.

Any help is appreciated.

–Tim Riendeau

Re: Action caching with multiple domains Just for the record I did figure out how to resolve this issue. I was able to resolve it by adding the following to my apache vhost file before the normal proxy rewrites.

RewriteCond %{HTTP_HOST} !^fully.qualified.domain.name [NC]

RewriteCond %{HTTP_HOST} !^$

RewriteRule ^/(.*) http://fully.qualified.domain.name/$1 [L,R,NE]

–Tim