Remove caching verbosely, add cached_cover_url

This commit is contained in:
Leeingnyo
2021-09-06 02:23:02 +09:00
parent c5b6a8b5b9
commit 565a535d22
5 changed files with 5 additions and 34 deletions
-4
View File
@@ -35,16 +35,12 @@ class SortOptions
end
def self.from_info_json(dir, username)
key = "#{dir}:#{username}:sort_opt"
cached_opt = LRUCache.get key
return cached_opt if cached_opt.is_a? SortOptions
opt = SortOptions.new
TitleInfo.new dir do |info|
if info.sort_by.has_key? username
opt = SortOptions.from_tuple info.sort_by[username]
end
end
LRUCache.set generate_cache_entry key, opt
opt
end