Synthetic files cache delegates to libraries cache
This commit is contained in:
+5
-2
@@ -100,11 +100,14 @@ public class KotlinCacheService(val project: Project) {
|
|||||||
|
|
||||||
private val syntheticFileCaches = object : SLRUCache<JetFile, KotlinResolveCache>(2, 3) {
|
private val syntheticFileCaches = object : SLRUCache<JetFile, KotlinResolveCache>(2, 3) {
|
||||||
override fun createValue(file: JetFile?): KotlinResolveCache {
|
override fun createValue(file: JetFile?): KotlinResolveCache {
|
||||||
|
val targetPlatform = TargetPlatformDetector.getPlatform(file!!)
|
||||||
return KotlinResolveCache(
|
return KotlinResolveCache(
|
||||||
project,
|
project,
|
||||||
globalResolveSessionProvider(
|
globalResolveSessionProvider(
|
||||||
TargetPlatformDetector.getPlatform(file!!),
|
targetPlatform,
|
||||||
syntheticFiles = listOf(file)
|
syntheticFiles = listOf(file),
|
||||||
|
reuseDataFromCache = globalCachesPerPlatform[targetPlatform]!!.librariesCache,
|
||||||
|
moduleFilter = { !it.isLibraryClasses() }
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user