【发布时间】:2016-09-20 07:43:13
【问题描述】:
网站分析器说我没有激活页面缓存,https://tools.pingdom.com/#!/bDj23F/www.anthonygalli.com。不过,我遵循了我能得到的每一步。我正在使用导轨"4.2.7.1"
在视图中
<%= render :partial => @posts, cached: true %>
在控制器中
fresh_when last_modified: @posts.created_at.utc, etag: @posts
在生产中.rb
config.action_controller.perform_caching = true
config.action_controller.asset_host = 'd37p52igaahgm9.cloudfront.net'
更新
【问题讨论】:
标签: ruby-on-rails ruby amazon-web-services heroku browser-cache