优化 EPUB 翻页与后台分页刷新
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user