Skip to content

Commit e03d2ef

Browse files
authored
[ci skip] Replace Caffeine cache with Guava cache
1 parent 863c5f6 commit e03d2ef

File tree

1 file changed

+4
-4
lines changed
  • bukkit/src/main/kotlin/io/wdsj/asw/bukkit/util/cache

1 file changed

+4
-4
lines changed

bukkit/src/main/kotlin/io/wdsj/asw/bukkit/util/cache/BookCache.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package io.wdsj.asw.bukkit.util.cache
22

3-
import com.github.benmanes.caffeine.cache.Cache
4-
import com.github.benmanes.caffeine.cache.Caffeine
3+
import com.google.common.cache.Cache
4+
import com.google.common.cache.CacheBuilder
55
import io.wdsj.asw.bukkit.AdvancedSensitiveWords.settingsManager
66
import io.wdsj.asw.bukkit.setting.PluginSettings
77
import java.util.concurrent.TimeUnit
@@ -47,7 +47,7 @@ object BookCache {
4747

4848
@JvmStatic
4949
fun initialize() {
50-
cache = Caffeine.newBuilder()
50+
cache = CacheBuilder.newBuilder()
5151
.maximumSize(
5252
settingsManager.getProperty(PluginSettings.BOOK_MAXIMUM_CACHE_SIZE).toLong()
5353
)
@@ -63,4 +63,4 @@ object BookCache {
6363
* Inner class to encapsulate the processed book content and its list of sensitive words.
6464
*/
6565
private data class BookCacheEntry(val processedContent: String, val sensitiveWordList: List<String>)
66-
}
66+
}

0 commit comments

Comments
 (0)