We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ceb91f0 commit 6d74b53Copy full SHA for 6d74b53
app/models/message_template.rb
@@ -1,7 +1,7 @@
1
class MessageTemplate < ApplicationRecord
2
class << self
3
# Maximum amount of time to use the in-memory singleton before checking the database for updates.
4
- SINGLETON_MAX_AGE = 30.seconds.from_now
+ SINGLETON_MAX_AGE = 30.seconds
5
6
# Retrieve the instance.
7
# Use the one stored in memory if it is recent enough.
@@ -23,7 +23,7 @@ def load_singleton
23
if none?
24
replace_with_default
25
end
26
- @singleton_expiration = SINGLETON_MAX_AGE
+ @singleton_expiration = SINGLETON_MAX_AGE.from_now
27
@singleton_instance = uncached_instance
28
29
0 commit comments