Synthetic files cache delegates to libraries cache

This commit is contained in:
Pavel V. Talanov
2014-09-16 16:41:38 +04:00
parent 8368689af8
commit 67c9a2323c
@@ -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() }
) )
) )
} }