Skip to content

Commit b4cbc0d

Browse files
committed
fresh_when 去掉一些很少修改的东西;
1 parent 96d9a8d commit b4cbc0d

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

app/controllers/application_controller.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,12 @@ def fresh_when(opts = {})
102102
# 加入页面上直接调用的信息用于组合 etag
103103
opts[:etag] << current_user
104104
# Config 的某些信息
105-
opts[:etag] << Setting.app_name
106105
opts[:etag] << SiteConfig.custom_head_html
107106
opts[:etag] << SiteConfig.footer_html
108-
opts[:etag] << SiteConfig.faye_server
109-
opts[:etag] << Setting.google_analytics_key
110107
# 加入通知数量
111108
opts[:etag] << unread_notify_count
112109
# 所有 etag 保持一天
113110
opts[:etag] << Date.current
114-
opts[:etag] << Time.now if not Rails.env.production?
115111
super(opts)
116112
end
117113
end

app/controllers/topics_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ def create
123123

124124
def preview
125125
@body = params[:body]
126-
126+
127127
respond_to do |format|
128128
format.json
129-
end
129+
end
130130
end
131131

132132
def update

0 commit comments

Comments
 (0)