Hello, I would like to cache the pages of my website. My website is available in 2 languages. When you switch from one language to another, the URL remains the same, but the articles are displayed in the appropriate language. So, if I enable caching, the .html page /content/details/123.html is written on the disk, and is accessed next time the same URL is accessed. The problem is that if the page is first accessed in French, and then accessed in English, the page will be displayed in French (from the cache) the second time too. Does anyone have a clue to help me find a solution? Thanks in advance for your help. Thomas. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thomas, > Does anyone have a clue to help me find a solution? I''d go with the obvious one: include the language code in the url. Without this, pages would not be bookmarkable/shareable. Alain --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Yes, I would agree. As the cool kids say, that would be the RESTful way to do it. What are you doing now, storing the language in the session? Switching to a URL-based solution should be painless. Just change your routes to something like mapconnect '':controller/:action/:language/:id'' and change your actions accordingly. Alain Ravet wrote:> Thomas, > > > Does anyone have a clue to help me find a solution? > > I''d go with the obvious one: include the language code in the url. > Without this, pages would not be bookmarkable/shareable. > > Alain > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I''ll try something like that. Thanks for your help. Thomas. On 10/18/06, Jason Norris <jasonmnorris-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Yes, I would agree. As the cool kids say, that would be the RESTful way > to do it. > What are you doing now, storing the language in the session? > > Switching to a URL-based solution should be painless. Just change your > routes to something like > mapconnect '':controller/:action/:language/:id'' > and change your actions accordingly. > > Alain Ravet wrote: > > Thomas, > > > > > Does anyone have a clue to help me find a solution? > > > > I''d go with the obvious one: include the language code in the url. > > Without this, pages would not be bookmarkable/shareable. > > > > Alain > > > > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---