diff options
author | Josh Frye <joshfng@gmail.com> | 2016-01-29 13:38:57 -0500 |
---|---|---|
committer | Josh Frye <joshfng@gmail.com> | 2016-01-29 13:39:33 -0500 |
commit | a6d6cfaf924f8002e807fda9bad03e866db2a4ec (patch) | |
tree | cf8d679825587801fcbb992a07a697425ff76f03 /app/models/broadcast_message.rb | |
parent | d8a292d9078a2de4f3cfe3308a57d5144cb448dd (diff) | |
download | gitlab-ce-a6d6cfaf924f8002e807fda9bad03e866db2a4ec.tar.gz |
Change ttl to 1 minutecache-broadcast-message-current
Diffstat (limited to 'app/models/broadcast_message.rb')
-rw-r--r-- | app/models/broadcast_message.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/broadcast_message.rb b/app/models/broadcast_message.rb index ab3778b6397..8a0a8a4c2a9 100644 --- a/app/models/broadcast_message.rb +++ b/app/models/broadcast_message.rb @@ -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 |