I''m having some trouble with caching (namely expiring action caches) on my production server: I have a site that can be accessed by both domain.com and www.domain.com. The problem is that pages cached through action caching are being put into both myapp/tmp/cache/domain.com and myapp/tmp/cache/ www.domain.com. So when it comes to expiring those actions, depending on how the site is being accessed, only part of the actions are expired (either in myapp/tmp/cache/domain.com or myapp/tmp/cache/ www.domain.com, but not both). Is there some config variable I can set in environment.rb to omit the hostname from the caching mechanism? The API documentation seems sparse in this regard. Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 8/14/07, cleaner416 <cleaner416-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I''m having some trouble with caching (namely expiring action caches) > on my production server: > > I have a site that can be accessed by both domain.com and www.domain.com. > The problem is that pages cached through action caching are being put > into both myapp/tmp/cache/domain.com and myapp/tmp/cache/ > www.domain.com. So when it comes to expiring those actions, > depending on how the site is being accessed, only part of the actions > are expired (either in myapp/tmp/cache/domain.com or myapp/tmp/cache/ > www.domain.com, but not both). > > Is there some config variable I can set in environment.rb to omit the > hostname from the caching mechanism? The API documentation seems > sparse in this regard.Is there some reason you''re using both domains? I''d setup a web server redirect for one domain to the other so you don''t split your google PR over 2 domains. -- Rick Olson http://lighthouseapp.com http://weblog.techno-weenie.net http://mephistoblog.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks, Rick - of course that''s the correct solution. On Aug 14, 3:42 pm, "Rick Olson" <technowee...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 8/14/07, cleaner416 <cleaner...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > I''m having some trouble with caching (namely expiring action caches) > > on my production server: > > > I have a site that can be accessed by both domain.com andwww.domain.com. > > The problem is that pages cached through action caching are being put > > into both myapp/tmp/cache/domain.com and myapp/tmp/cache/ > >www.domain.com. So when it comes to expiring those actions, > > depending on how the site is being accessed, only part of the actions > > are expired (either in myapp/tmp/cache/domain.com or myapp/tmp/cache/ > >www.domain.com, but not both). > > > Is there some config variable I can set in environment.rb to omit the > > hostname from the caching mechanism? The API documentation seems > > sparse in this regard. > > Is there some reason you''re using both domains? I''d setup a web > server redirect for one domain to the other so you don''t split your > google PR over 2 domains. > > -- > Rick Olsonhttp://lighthouseapp.comhttp://weblog.techno-weenie.nethttp://mephistoblog.com--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
>>> I''m having some trouble with caching (namely expiring action caches) >>> on my production server: >> >>> I have a site that can be accessed by both domain.com andwww.domain.com. >>> The problem is that pages cached through action caching are being put >>> into both myapp/tmp/cache/domain.com and myapp/tmp/cache/ >>> www.domain.com. So when it comes to expiring those actions, >>> depending on how the site is being accessed, only part of the actions >>> are expired (either in myapp/tmp/cache/domain.com or myapp/tmp/cache/ >>> www.domain.com, but not both). >> >>> Is there some config variable I can set in environment.rb to omit the >>> hostname from the caching mechanism? The API documentation seems >>> sparse in this regard. >> >> Is there some reason you''re using both domains? I''d setup a web >> server redirect for one domain to the other so you don''t split your >> google PR over 2 domains.> Thanks, Rick - of course that''s the correct solution.Be sure to use 301 redirects. Google *hates* 302. -philip --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---