Move entry specific method

This commit is contained in:
Leeingnyo
2021-09-04 14:13:33 +09:00
parent 0a8fd993e5
commit 9e90aa17b9
3 changed files with 42 additions and 38 deletions

View File

@@ -188,8 +188,8 @@ class Entry
InfoCache.invalidate_progress_cache parent.id, username
end
[false, true].each do |ascend|
sorted_entries_cache_key = SortedEntriesCache.gen_key @book.id, username,
@book.entries, SortOptions.new(SortMethod::Progress, ascend)
sorted_entries_cache_key = SortedEntriesCacheEntry.gen_key @book.id,
username, @book.entries, SortOptions.new(SortMethod::Progress, ascend)
SortedEntriesCache.invalidate sorted_entries_cache_key
end