mirror of
https://github.com/gotson/komga.git
synced 2025-12-19 23:12:47 +01:00
fix: synchronous cache eviction when closing PDDocument
This commit is contained in:
parent
273071ea9b
commit
f25c74f759
2 changed files with 2 additions and 2 deletions
|
|
@ -27,7 +27,7 @@ class PdfExtractor : MediaContainerExtractor {
|
|||
private val cache = Caffeine.newBuilder()
|
||||
.maximumSize(20)
|
||||
.expireAfterAccess(1, TimeUnit.MINUTES)
|
||||
.removalListener { _: Path?, pdf: PDDocument?, _ -> pdf?.close() }
|
||||
.evictionListener { _: Path?, pdf: PDDocument?, _ -> pdf?.close() }
|
||||
.build<Path, PDDocument>()
|
||||
|
||||
override fun mediaTypes(): List<String> = listOf("application/pdf")
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class ZipExtractor(
|
|||
private val cache = Caffeine.newBuilder()
|
||||
.maximumSize(20)
|
||||
.expireAfterAccess(1, TimeUnit.MINUTES)
|
||||
.removalListener { _: Path?, zip: ZipFile?, _ -> zip?.close() }
|
||||
.evictionListener { _: Path?, zip: ZipFile?, _ -> zip?.close() }
|
||||
.build<Path, ZipFile>()
|
||||
|
||||
private val natSortComparator: Comparator<String> = CaseInsensitiveSimpleNaturalComparator.getInstance()
|
||||
|
|
|
|||
Loading…
Reference in a new issue