Extend OWLS caching from 15 minutes to 1 day
Poking at the site, I didn't love that clicking any of the NC items on the homepage took a few seconds to load cuz of the OWLS request taking a couple seconds. If the request were faster to load I might decide otherwise, but for now, let's just keep that cache long. Another approach we could take would be to ask for an endpoint that returns all the values at once, so we could cache and update them all together, instead of having it all split into separate cache keys!
This commit is contained in:
parent
e337767954
commit
6d343989de
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ module OwlsValueGuide
|
|||
def self.find_by_name(item_name)
|
||||
# Load the itemdata, pulling from the Rails cache if possible.
|
||||
cache_key = "OwlsValueGuide/itemdata/#{item_name}"
|
||||
data = Rails.cache.fetch(cache_key, expires_in: 15.minutes) do
|
||||
data = Rails.cache.fetch(cache_key, expires_in: 1.day) do
|
||||
load_itemdata(item_name)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue