Skip to content
Snippets Groups Projects
Commit a6d6cfaf authored by Josh Frye's avatar Josh Frye
Browse files

Change ttl to 1 minute

parent d8a292d9
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment