forked from Gitlink/forgeplus
Compare commits
2 Commits
de2ee51fc4
...
55f60bf062
Author | SHA1 | Date |
---|---|---|
xxq250 | 55f60bf062 | |
xxq250 | 6287566eb8 |
|
@ -25,9 +25,13 @@ class EduSetting < ApplicationRecord
|
|||
end
|
||||
|
||||
def self.get(key)
|
||||
begin
|
||||
Rails.cache.fetch(value_cache_key(key), expires_in: 1.days) do
|
||||
find_by_name(key.to_s)&.value
|
||||
end
|
||||
rescue Exception => e
|
||||
find_by_name(key.to_s)&.value
|
||||
end
|
||||
end
|
||||
|
||||
def self.value_cache_key(name)
|
||||
|
|
Loading…
Reference in New Issue