Fixed expression loading, improved hash codes down evaluation pipeline

This commit is contained in:
Auxilor
2023-05-03 14:18:50 +01:00
parent 0f9bf094ae
commit 5de4914fd7
4 changed files with 40 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ import java.util.concurrent.TimeUnit
class DelegatedExpressionHandler(
plugin: EcoPlugin,
private val handler: ExpressionHandler
): ExpressionHandler {
) : ExpressionHandler {
private val evaluationCache: Cache<Int, Double> = Caffeine.newBuilder()
.expireAfterWrite(plugin.configYml.getInt("math-cache-ttl").toLong(), TimeUnit.MILLISECONDS)
.build()