提交 a6d6cfaf 编写于 作者: J Josh Frye

Change ttl to 1 minute

上级 d8a292d9
......@@ -26,7 +26,7 @@ class BroadcastMessage < ActiveRecord::Base
default_value_for :font, '#FFFFFF'
def self.current
Rails.cache.fetch("broadcast_message_current", expires_in: 5.minutes) do
Rails.cache.fetch("broadcast_message_current", expires_in: 1.minute) do
where("ends_at > :now AND starts_at <= :now", now: Time.zone.now).last
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册