If I wanted to do something funky along the lines of dynamically changing a call to an extenal routing module from within routes.rb based on the incoming request domain... would routes.rb be cached when in production mode or will it be evaluated afresh for every request? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
David Smalley wrote:> If I wanted to do something funky along the lines of dynamically > changing a call to an extenal routing module from within routes.rb > based on the incoming request domain... would routes.rb be cached when > in production mode or will it be evaluated afresh for every request?im pretty sure its cached, otherwise you wouldnt need to restart the webs erver when making changed to routes.rb peace --jake -- Posted via http://www.ruby-forum.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 -~----------~----~----~----~------~----~------~--~---
David Smalley wrote:> If I wanted to do something funky along the lines of dynamically > changing a call to an extenal routing module from within routes.rb > based on the incoming request domain... would routes.rb be cached when > in production mode or will it be evaluated afresh for every request?The file itself is cached, but you can still have methods and other stuff in there that get properly executed. The code is cached, but not the codes result for each route. So as long your code doesnt actually alter the contents of routes.rb, then you should be fine. And if you are rewriting routes.rb I strongly finding a better way to handle this. -- Posted via http://www.ruby-forum.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 -~----------~----~----~----~------~----~------~--~---