Fix FastJarFS caches cleaning
- add FastJarFS cache cleaning to the daemon implementation, so the behavior is now the same as for CoreJarFS - clear not only mappings but also handlers cache: this may result some slowdown on comparison with the previous cleaning implementation, but should avoid unreliable behavior on heavy parallel build usages.
This commit is contained in:
committed by
Space Team
parent
82100a414f
commit
23144b92d8
+1
-1
@@ -51,7 +51,7 @@ class KotlinCoreApplicationEnvironment private constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun idleCleanup() {
|
fun idleCleanup() {
|
||||||
fastJarFileSystemField?.cleanOpenFilesCache()
|
fastJarFileSystemField?.clearHandlersCache()
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|||||||
@@ -1235,7 +1235,10 @@ class CompileServiceImpl(
|
|||||||
|
|
||||||
override fun clearJarCache() {
|
override fun clearJarCache() {
|
||||||
ZipHandler.clearFileAccessorCache()
|
ZipHandler.clearFileAccessorCache()
|
||||||
(KotlinCoreEnvironment.applicationEnvironment?.jarFileSystem as? CoreJarFileSystem)?.clearHandlersCache()
|
KotlinCoreEnvironment.applicationEnvironment?.apply {
|
||||||
|
(jarFileSystem as? CoreJarFileSystem)?.clearHandlersCache()
|
||||||
|
idleCleanup()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private inline fun <R> ifAlive(
|
private inline fun <R> ifAlive(
|
||||||
|
|||||||
Reference in New Issue
Block a user