Implement library caching TitleInfo

* Cache sum of entry progress
* Cache cover_url
* Cache display_name
* Cache sort_opt
This commit is contained in:
Leeingnyo
2021-08-22 23:36:28 +09:00
parent 00c9cc1fcd
commit 4a09aee177
6 changed files with 200 additions and 2 deletions
+4
View File
@@ -102,6 +102,8 @@ class Library
storage = Storage.new auto_close: false
InfoCache.clear
(Dir.entries @dir)
.select { |fn| !fn.starts_with? "." }
.map { |fn| File.join @dir, fn }
@@ -115,6 +117,8 @@ class Library
@title_ids << title.id
end
InfoCache.clean
storage.bulk_insert_ids
storage.close