> This is working, except for the fact that it is creating 2 different
caches:
>
> /home/username/domains/foo.com/web/public/cache/foo.com
> /home/username/domains/foo.com/web/public/cache/www.foo.com
>
> Obviously, which cached version is used depends on which address the
> user is using, www.foo.com, or foo.com. Having 2 different caches
> seems ... very bad. When I expire a fragment, it only expires based
> on the current url, so one of the caches doesn''t get expired. Any
> ideas? Or should I perhaps file this as a bug on rails trac?
One solution is to force your users through one or the either. Create
a rewrite rule in your web server config that redirects www.foo to foo
or vice versa.
This is certainly not a bug, though. It was designed to differ to
accomodate for that lots of apps are using subdomains to track
accounts. So that david.foo and belorion.foo access the same
controller, but load different data.
--
David Heinemeier Hansson
http://www.loudthinking.com -- Broadcasting Brain
http://www.basecamphq.com -- Online project management
http://www.backpackit.com -- Personal information manager
http://www.rubyonrails.com -- Web-application framework