We've had the same problem and hope it's now working like this: http://github.com/svenfuchs/adva_cms/blob/fd7f9348b9e9cccd3ab5af2da5437e6ca6ac9e56/engines/adva_themes/lib/theme_support/compiled_template_expiration.rb
Basically, when the user saves a template we touch the theme directory. When the template is rendered we check the directory mtime against the compile time for that template and recompile if necessary. It's necessary to do it this way around (instead of just expiring the compiled/cached template in the same request when the template was saved) because compiled templates of course are cached per process (e.g. mongrel) and you could not expire them for all other running processes. Of course that code is likely to break as soon as ActionView moves by a millimeter ;) On 06.02.2009, at 13:19, Stijnster wrote: > > Hi all, > > a while ago I developed a CMS that allows user with the "designer" > role to create templates. These templates are written to disk and are > regular erb files. They are stored inside the app/views folder. > > Back then I developed on rails 2.1 which had the > config.action_view.cache_template_loading settings. That allowed me to > cache the whole application, except the views (since the designer > could edit them, bringing the application down-and-up wouldn't be a > good idea). > > After a migration to rails 2.3 I noticed this settings was gone and > replaced by "config.cache_classes", which caches the application as a > whole, including the views. I was forced to set the production setting > to "false" in order to make it work. > > The current request-response time is only 25% of the request-response > time in rails 2.1 (it dropped from 20 to 6). > > Is there anyone with an idea to enable the config.cache_classes, but > still reload the views as necessary (faking out the old > config.action_view.cache_template_loading setting)? > > Cheers, > > Stijn > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---