I am using fragment caching - the cache gets stored under RAILS_ROOT/
tmp/cache/www.mysite.com but if someone goes to http://mysite.com (no
www) then, a *second* cache gets stored at RAILS_ROOT/tmp/cache/
mysite.com - from this point on, the cache is hit at both URL
locations but I end up with 2X the DB hits and 2X over-the-wire web
service calls etc I really need.
This is turning out to be really really expensive. How can I avoid
this?
I am using fragment caching - the cache gets stored under RAILS_ROOT/
tmp/cache/www.mysite.com but if someone goes to http://mysite.com (no
www) then, a *second* cache gets stored at RAILS_ROOT/tmp/cache/
mysite.com - from this point on, the cache is hit at both URL
locations but I end up with 2X the DB hits and 2X over-the-wire web
service calls etc I really need.
This is turning out to be really really expensive. How can I avoid
this?
Any ideas?
Not a solution to your problem directly, but you may want to consider 301 redirecting all requests to mysite.com to www.mysite.com.
I know that Google will punish your page rankings if it sees the same content in multiple domains...
As a side effect it would also solve your problem..
That's an idea that would have the side-effect of solving my problem
yes, but I don't believe Google will punish PR between www and a plain
site.com. As you say multiple domains: perhaps between alpha.com and
beta.com if there's exactly the same content, then... maybe.