diff --git a/montecristo/src/main/kotlin/com/datastax/montecristo/model/application/CassandraYaml.kt b/montecristo/src/main/kotlin/com/datastax/montecristo/model/application/CassandraYaml.kt index fda806a..07ba580 100644 --- a/montecristo/src/main/kotlin/com/datastax/montecristo/model/application/CassandraYaml.kt +++ b/montecristo/src/main/kotlin/com/datastax/montecristo/model/application/CassandraYaml.kt @@ -32,7 +32,7 @@ data class CassandraYaml(val data : JsonNode) : YamlConfig(data) { val memtableAllocationType get() = get("memtable_allocation_type") val authorizer get() = get("authorizer") val rowCacheSizeInMB get() = ( - get("row_cache_size", "0").replace("MiB", "") + get("row_cache_size", "0").replace("\\D+".toRegex(), "") ).toInt() fun isRowCacheEnabled(): Boolean { return (rowCacheSizeInMB.toString().toInt() > 0)