优化 EPUB 翻页与后台分页刷新

This commit is contained in:
shen
2026-07-06 11:08:28 +09:00
committed by shenlei
parent 71f4feb12f
commit 9e91207011
7 changed files with 274 additions and 32 deletions
@@ -137,7 +137,7 @@ public final class RDEPUBTextBookCache {
let fileURL = cacheDirectory.appendingPathComponent(key)
guard FileManager.default.fileExists(atPath: fileURL.path) else {
#if DEBUG
print("[Cache] load MISS key=\(key)")
// print("[Cache] load MISS key=\(key)")
#endif
return nil
}
@@ -148,7 +148,7 @@ public final class RDEPUBTextBookCache {
from: data
) else {
#if DEBUG
print("[Cache] load MISS key=\(key) (unarchive returned nil)")
// print("[Cache] load MISS key=\(key) (unarchive returned nil)")
#endif
return nil
}
@@ -157,12 +157,12 @@ public final class RDEPUBTextBookCache {
result[chapter.href] = chapter.toCache()
}
#if DEBUG
print("[Cache] load HIT key=\(key) chapters=\(result.count)")
// print("[Cache] load HIT key=\(key) chapters=\(result.count)")
#endif
return result
} catch {
#if DEBUG
print("[Cache] load MISS key=\(key) error=\(error)")
// print("[Cache] load MISS key=\(key) error=\(error)")
#endif
return nil
}