[LL FIR] Add Caffeine library dependency
- Our current FIR caches are based on `ConcurrentMap` and thereby do not support size and lifetime limits out of the box. For example, first-layer caches with a limited size can speed up access of the most frequently used elements, while having a small memory footprint. - Caffeine is a modern and well optimized caching library that allows us to create thread-safe and performant caches with various size or lifetime limits. - The cache must support concurrency because session components such as symbol providers may be accessed concurrently once parallel resolve in the Analysis API has been implemented (see KT-55750). Caffeine caches support concurrency.
This commit is contained in:
committed by
Space Team
parent
a7360a54fe
commit
b805c6e32b
@@ -26,6 +26,9 @@ dependencies {
|
||||
implementation(project(":analysis:analysis-api-providers"))
|
||||
implementation(project(":analysis:analysis-internal-utils"))
|
||||
|
||||
// We cannot use the latest version `3.1.5` because it doesn't support Java 8.
|
||||
implementation("com.github.ben-manes.caffeine:caffeine:2.9.3")
|
||||
|
||||
api(intellijCore())
|
||||
|
||||
testApi(projectTests(":compiler:test-infrastructure-utils"))
|
||||
|
||||
Reference in New Issue
Block a user