Replace InfoCache to LRUCache

This commit is contained in:
Leeingnyo
2021-09-05 01:54:19 +09:00
parent 0fd7caef4b
commit de410f42b8
6 changed files with 61 additions and 190 deletions

View File

@@ -120,7 +120,8 @@ macro get_and_save_sort_opt(dir)
sort_opt = SortOptions.new sort_method, is_ascending
InfoCache.set_sort_opt {{dir}}, username, sort_opt
key = "#{{{dir}}}:#{username}:sort_opt"
LRUCache.set generate_cache_entry key, sort_opt
TitleInfo.new {{dir}} do |info|
info.sort_by[username] = sort_opt.to_tuple
info.save