简体   繁体   中英

How do I stop caching of layout in production with Ruby on Rails?

I'm building a rails app allows the admin to load (and reload) an .erb template that will function as a layout. ie the application.html.erb

On occasion when updating an already created template to my hosted app the changes do not take effect. If I load a differently named file to the same template this does show the changes.

This is not an issue in DEV on my local environment but is an issue for PROD. Is there a setting that controls the caching of the layout for a page? The dynamic content is no problem but the static layout does not change unless I restart the app. Please let me know if you have any brilliant insights about this issue, or if it needs greater explanation.

刚弄清楚-将其添加到production.rb环境文件中;

config.action_view.cache_template_loading = false

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM