Ruby on Rails 的缓存


设置缓存,让你的网站访问速度提高100倍,本来服务器\带宽就很差的,那么缓存就更加的有必要了, 直接访问html,就可以减少cpu处理ruby的脚本,这个解析是很费时间的,而直接访问 html文件,通过nginx访问就可以了.速度会提高很多很多....所以缓存是必须的....迟早的事. uninitialized constant RAILS_ROOT ===Use Rails.root instead of RAILS_ROOT constant. config.action_controller.page_cache_directory = "#{Rails.root}/public/cache" 在部署后,出现错误 Errno::EACCES Permission denied ,无法访问。貌似在生成 *.html的时候无法访问文件夹。 权限配置问题 :需要给文件夹修改权限。或者 增加nobody的为所有者。 chown chmod 解决中。。。吃饭先 已经解决:http://www.lehazi.com/posts/ror-cache-www-root

阅读量: 520
发布于:
修改于: