On 4 June 2010 15:23, Marnen Laibow-Koser <[email protected]> wrote: > Jian Lin wrote: >> At work, we have a situation where when >> >> script/server >> >> is run, then all the controller code is cached. This is to speed up the >> development server. But that will mean that whenever we change the >> controller code, we need to restart the server. > > Yes, that's normal behavior in development mode.
I thought that was the normal behaviour in production mode, not development. Colin > >> >> So we can turn off the caching of controller code all together. But >> can't there be mechanism that is similar to the inclusion of javascript >> >> foo.js?1273424325 >> >> which is to use the cached version as long as there is no code change, >> but recompile it when there is code change? > > Because it's a different kind of caching. JavaScript caching simply > involves using the browser cache for included files, whereas controller > caching involves Ruby objects in memory on the server. > >> >> Maybe because we use HAML and SASS a lot, loading some page (such as the >> homepage of the site) can take 40 seconds on the dev environment and it >> is quite long. > > Haml and Sass shouldn't be having that effect. Look elsewhere for your > problems. > > The fact that you're asking this makes me think that you want *page* > caching, not controller caching. > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > [email protected] > > -- > 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

